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

2017-06-26 Thread jeffy
Hi Thomas Gleixner, On 05/31/2017 07:02 AM, Thomas Gleixner wrote: On Mon, 29 May 2017, jeffy.chen wrote: i think if we want to make all irq enable/disable balance, maybe we can: 1/ only call irq_enable/disable from enable/disable_irq(change other irq_enable/disable to enable/disable_irq), so

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

2017-06-26 Thread jeffy
Hi Thomas Gleixner, On 05/31/2017 07:02 AM, Thomas Gleixner wrote: On Mon, 29 May 2017, jeffy.chen wrote: i think if we want to make all irq enable/disable balance, maybe we can: 1/ only call irq_enable/disable from enable/disable_irq(change other irq_enable/disable to enable/disable_irq), so

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

2017-05-30 Thread Thomas Gleixner
On Mon, 29 May 2017, jeffy.chen wrote: > i think if we want to make all irq enable/disable balance, maybe we can: > > 1/ only call irq_enable/disable from enable/disable_irq(change other > irq_enable/disable to enable/disable_irq), so they would be protected by the > refcnt(deph) You cannot call

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

2017-05-30 Thread Thomas Gleixner
On Mon, 29 May 2017, jeffy.chen wrote: > i think if we want to make all irq enable/disable balance, maybe we can: > > 1/ only call irq_enable/disable from enable/disable_irq(change other > irq_enable/disable to enable/disable_irq), so they would be protected by the > refcnt(deph) You cannot call

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

2017-05-29 Thread Thomas Gleixner
Tomasz, On Sun, 28 May 2017, Tomasz Figa wrote: > On Sat, May 27, 2017 at 8:12 PM, Thomas Gleixner wrote: > I think we might simply have a language barrier here unfortunately. I > agree, though, that we need a better description of the problem. Next > time we will help Jeffy

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

2017-05-29 Thread Thomas Gleixner
Tomasz, On Sun, 28 May 2017, Tomasz Figa wrote: > On Sat, May 27, 2017 at 8:12 PM, Thomas Gleixner wrote: > I think we might simply have a language barrier here unfortunately. I > agree, though, that we need a better description of the problem. Next > time we will help Jeffy with polishing the

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

2017-05-27 Thread Tomasz Figa
Hi Thomas, Thank you for your comments. Please see my replies inline. On Sat, May 27, 2017 at 8:12 PM, Thomas Gleixner wrote: > On Sat, 27 May 2017, Jeffy Chen wrote: > >> If a irq is already disabled, irq_shutdown may try to disable it again, >> for example: >>

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

2017-05-27 Thread Tomasz Figa
Hi Thomas, Thank you for your comments. Please see my replies inline. On Sat, May 27, 2017 at 8:12 PM, Thomas Gleixner wrote: > On Sat, 27 May 2017, Jeffy Chen wrote: > >> If a irq is already disabled, irq_shutdown may try to disable it again, >> for example: >>

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

2017-05-27 Thread Thomas Gleixner
On Sat, 27 May 2017, Jeffy Chen wrote: > If a irq is already disabled, irq_shutdown may try to disable it again, > for example: > devm_request_irq->irq_startup->irq_enable > disable_irq <-- disabled > devm_free_irq->irq_shutdown <-- disable it

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

2017-05-27 Thread Thomas Gleixner
On Sat, 27 May 2017, Jeffy Chen wrote: > If a irq is already disabled, irq_shutdown may try to disable it again, > for example: > devm_request_irq->irq_startup->irq_enable > disable_irq <-- disabled > devm_free_irq->irq_shutdown <-- disable it

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

2017-05-27 Thread Jeffy Chen
If a irq is already disabled, irq_shutdown may try to disable it again, for example: devm_request_irq->irq_startup->irq_enable disable_irq <-- disabled devm_free_irq->irq_shutdown <-- disable it again This would confuse some chips which

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

2017-05-27 Thread Jeffy Chen
If a irq is already disabled, irq_shutdown may try to disable it again, for example: devm_request_irq->irq_startup->irq_enable disable_irq <-- disabled devm_free_irq->irq_shutdown <-- disable it again This would confuse some chips which