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

2017-05-31 Thread Thomas Gleixner
On Tue, 30 May 2017, Brian Norris wrote: > On Sat, May 27, 2017 at 10:16:37AM +0200, Thomas Gleixner wrote: > > On Sat, 27 May 2017, jeffy wrote: > > > for example when a driver(drivers/net/wireless/marvell/mwifiex/main.c) > > > try to > > > do these: > > > > > >

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

2017-05-31 Thread Thomas Gleixner
On Tue, 30 May 2017, Brian Norris wrote: > On Sat, May 27, 2017 at 10:16:37AM +0200, Thomas Gleixner wrote: > > On Sat, 27 May 2017, jeffy wrote: > > > for example when a driver(drivers/net/wireless/marvell/mwifiex/main.c) > > > try to > > > do these: > > > > > >

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

2017-05-31 Thread Thomas Gleixner
On Tue, 30 May 2017, Brian Norris wrote: > Sorry to respond to myself. Thomas, your reply to another mail in this > series helped me to notice: > > On Tue, May 30, 2017 at 04:19:58PM -0700, Brian Norris wrote: > > Side note: for issues like the first problem above, I wonder why there > > isn't a

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

2017-05-31 Thread Thomas Gleixner
On Tue, 30 May 2017, Brian Norris wrote: > Sorry to respond to myself. Thomas, your reply to another mail in this > series helped me to notice: > > On Tue, May 30, 2017 at 04:19:58PM -0700, Brian Norris wrote: > > Side note: for issues like the first problem above, I wonder why there > > isn't a

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

2017-05-30 Thread Brian Norris
Sorry to respond to myself. Thomas, your reply to another mail in this series helped me to notice: On Tue, May 30, 2017 at 04:19:58PM -0700, Brian Norris wrote: > Side note: for issues like the first problem above, I wonder why there > isn't a flag that once could pass to request_irq() that

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

2017-05-30 Thread Brian Norris
Sorry to respond to myself. Thomas, your reply to another mail in this series helped me to notice: On Tue, May 30, 2017 at 04:19:58PM -0700, Brian Norris wrote: > Side note: for issues like the first problem above, I wonder why there > isn't a flag that once could pass to request_irq() that

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

2017-05-30 Thread Brian Norris
Hi, To address a tangent brought up here: On Sat, May 27, 2017 at 10:16:37AM +0200, Thomas Gleixner wrote: > On Sat, 27 May 2017, jeffy wrote: > > for example when a driver(drivers/net/wireless/marvell/mwifiex/main.c) try > > to > > do these: > > > > devm_request_irq->irq_startup->irq_enable >

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

2017-05-30 Thread Brian Norris
Hi, To address a tangent brought up here: On Sat, May 27, 2017 at 10:16:37AM +0200, Thomas Gleixner wrote: > On Sat, 27 May 2017, jeffy wrote: > > for example when a driver(drivers/net/wireless/marvell/mwifiex/main.c) try > > to > > do these: > > > > devm_request_irq->irq_startup->irq_enable >

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

2017-05-27 Thread Thomas Gleixner
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

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

2017-05-27 Thread Thomas Gleixner
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

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

2017-05-26 Thread jeffy
Hi Thomas, 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

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

2017-05-26 Thread jeffy
Hi Thomas, 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

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

2017-05-26 Thread Thomas Gleixner
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?

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

2017-05-26 Thread Thomas Gleixner
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?

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

2017-05-26 Thread Jeffy Chen
If irq is already disabled and masked, we would hit a unbalanced irq shutdown/disable/mask when freeing it. Add a state check in irq_shutdown to prevent this. Signed-off-by: Jeffy Chen --- kernel/irq/chip.c | 8 +++- 1 file changed, 7 insertions(+), 1

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

2017-05-26 Thread Jeffy Chen
If irq is already disabled and masked, we would hit a unbalanced irq shutdown/disable/mask when freeing it. Add a state check in irq_shutdown to prevent this. Signed-off-by: Jeffy Chen --- kernel/irq/chip.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git