Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651802

Re: [PATCH] genirq: Check irq disabled & masked states in irq_shutdown

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH] genirq: Check irq disabled & masked states in irq_shutdown
Date 2017-05-27 10:20 +0200
Message-ID <tLF74-H2-15@gated-at.bofh.it> (permalink)
References <tLnjP-6mu-3@gated-at.bofh.it> <tLntw-6pE-11@gated-at.bofh.it> <tLBZv-70X-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 27 May 2017, jeffy wrote:
> On 05/26/2017 09:20 PM, Thomas Gleixner wrote:
> > On Fri, 26 May 2017, Jeffy Chen wrote:
> > 
> > > If irq is already disabled and masked, we would hit a unbalanced irq
> > > shutdown/disable/mask when freeing it.
> > 
> > Errr? What exactly is unbalanced? None of the called functions has any
> > counter or whatever.
> > 
> > Can you please explain what you are trying to fix?
> 
> sorry, i'll try to rewrite the commit message.
> 
> for example when a driver(drivers/net/wireless/marvell/mwifiex/main.c) try to
> do these:
> 
> devm_request_irq->irq_startup->irq_enable
> disable_irq                                     <-- disabled and masked
> devm_free_irq->irq_shutdown                     <-- disable it again

This driver is broken as hell. It requests the interrupt _BEFORE_ the whole
thing is initialized. If there is a pending interrupt on that line, it will
explode nicely before it is able to disable the irq. But that's a different
problem.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] genirq: Check irq disabled & masked states in irq_shutdown Jeffy Chen <jeffy.chen@rock-chips.com> - 2017-05-26 15:20 +0200
  Re: [PATCH] genirq: Check irq disabled & masked states in  irq_shutdown Thomas Gleixner <tglx@linutronix.de> - 2017-05-26 15:30 +0200
    Re: [PATCH] genirq: Check irq disabled & masked states in irq_shutdown jeffy <jeffy.chen@rock-chips.com> - 2017-05-27 07:00 +0200
      Re: [PATCH] genirq: Check irq disabled & masked states in  irq_shutdown Thomas Gleixner <tglx@linutronix.de> - 2017-05-27 10:20 +0200
        Re: [PATCH] genirq: Check irq disabled & masked states in  irq_shutdown Brian Norris <briannorris@chromium.org> - 2017-05-31 01:30 +0200
          Re: [PATCH] genirq: Check irq disabled & masked states in  irq_shutdown Brian Norris <briannorris@chromium.org> - 2017-05-31 01:40 +0200
            Re: [PATCH] genirq: Check irq disabled & masked states in  irq_shutdown Thomas Gleixner <tglx@linutronix.de> - 2017-05-31 10:40 +0200
          Re: [PATCH] genirq: Check irq disabled & masked states in  irq_shutdown Thomas Gleixner <tglx@linutronix.de> - 2017-05-31 11:30 +0200

csiph-web