Re: Disabling an interrupt in the handler locks the system up

2016-10-25 Thread Mason
On 25/10/2016 12:45, Marc Zyngier wrote: > On 25/10/16 09:36, Mason wrote: >> On 25/10/2016 10:29, Sebastian Frias wrote: >> >>> On 10/24/2016 06:55 PM, Thomas Gleixner wrote: >>> On Mon, 24 Oct 2016, Mason wrote: > For the record, setting the IRQ_DISABLE_UNLAZY flag for this device >

Re: Disabling an interrupt in the handler locks the system up

2016-10-25 Thread Thomas Gleixner
On Tue, 25 Oct 2016, Mason wrote: > Is the irq_mask() call-back exposed via some module-visible API? No. And there is no reason to do so. Thanks, tglx

Re: Disabling an interrupt in the handler locks the system up

2016-10-25 Thread Marc Zyngier
On 25/10/16 09:36, Mason wrote: > On 25/10/2016 10:29, Sebastian Frias wrote: > >> On 10/24/2016 06:55 PM, Thomas Gleixner wrote: >> >>> On Mon, 24 Oct 2016, Mason wrote: >>> For the record, setting the IRQ_DISABLE_UNLAZY flag for this device makes the system lock-up disappear. >>> >>> T

Re: Disabling an interrupt in the handler locks the system up

2016-10-25 Thread Thomas Gleixner
On Tue, 25 Oct 2016, Sebastian Frias wrote: > On 10/24/2016 06:55 PM, Thomas Gleixner wrote: > > On Mon, 24 Oct 2016, Mason wrote: > >> > >> For the record, setting the IRQ_DISABLE_UNLAZY flag for this device > >> makes the system lock-up disappear. > > > > The way how lazy irq disabling works is:

Re: Disabling an interrupt in the handler locks the system up

2016-10-25 Thread Sebastian Frias
Hi Thomas, On 10/24/2016 06:55 PM, Thomas Gleixner wrote: > On Mon, 24 Oct 2016, Mason wrote: >> >> For the record, setting the IRQ_DISABLE_UNLAZY flag for this device >> makes the system lock-up disappear. > > The way how lazy irq disabling works is: > > 1) Interrupt is marked disabled in softw

Re: Disabling an interrupt in the handler locks the system up

2016-10-25 Thread Mason
On 25/10/2016 10:29, Sebastian Frias wrote: > On 10/24/2016 06:55 PM, Thomas Gleixner wrote: > >> On Mon, 24 Oct 2016, Mason wrote: >> >>> For the record, setting the IRQ_DISABLE_UNLAZY flag for this device >>> makes the system lock-up disappear. >> >> The way how lazy irq disabling works is: >> >

Re: Disabling an interrupt in the handler locks the system up

2016-10-24 Thread Thomas Gleixner
On Mon, 24 Oct 2016, Mason wrote: > > For the record, setting the IRQ_DISABLE_UNLAZY flag for this device > makes the system lock-up disappear. The way how lazy irq disabling works is: 1) Interrupt is marked disabled in software, but the hardware is not masked 2) If the interrupt fires befor th

Re: Disabling an interrupt in the handler locks the system up

2016-10-24 Thread Mason
On 23/10/2016 01:10, Mason wrote: > Maybe the fact that disable_irq locks the system up is an orthogonal > issue that needs to be fixed anyway. disable_irq_nosync() eventually calls irq_disable() void irq_disable(struct irq_desc *desc) { irq_state_set_disabled(desc); if (desc->ir

Re: Disabling an interrupt in the handler locks the system up

2016-10-24 Thread Marc Zyngier
On 23/10/16 00:10, Mason wrote: > On 22/10/2016 13:37, Marc Zyngier wrote: > >> Mason wrote: >> >>> In my mental picture of interrupts (which is obviously so >>> incomplete as to be wrong) interrupts are a way for hardware >>> to tell the CPU that they urgently need the CPU's attention. >> >> That

Re: Disabling an interrupt in the handler locks the system up

2016-10-22 Thread Mason
On 22/10/2016 13:37, Marc Zyngier wrote: > Mason wrote: > >> In my mental picture of interrupts (which is obviously so >> incomplete as to be wrong) interrupts are a way for hardware >> to tell the CPU that they urgently need the CPU's attention. > > That's how the CPU interprets it, but this is

Re: Disabling an interrupt in the handler locks the system up

2016-10-22 Thread Marc Zyngier
On Fri, 21 Oct 2016 22:27:23 +0200 Mason wrote: > On 21/10/2016 21:49, Thomas Gleixner wrote: > > On Fri, 21 Oct 2016, Mason wrote: > >> On 21/10/2016 21:14, Marc Zyngier wrote: > >>> If connecting a device that signals its interrupt as level low to an > >>> input line configured as level hig

Re: Disabling an interrupt in the handler locks the system up

2016-10-21 Thread Mason
On 21/10/2016 21:49, Thomas Gleixner wrote: > On Fri, 21 Oct 2016, Mason wrote: >> On 21/10/2016 21:14, Marc Zyngier wrote: >>> If connecting a device that signals its interrupt as level low to an >>> input line configured as level high doesn't strike you as a major >>> issue, nothing will. At that

Re: Disabling an interrupt in the handler locks the system up

2016-10-21 Thread Thomas Gleixner
On Fri, 21 Oct 2016, Mason wrote: > On 21/10/2016 21:14, Marc Zyngier wrote: > > If connecting a device that signals its interrupt as level low to an > > input line configured as level high doesn't strike you as a major > > issue, nothing will. At that point, you can put anything you want in > > yo

Re: Disabling an interrupt in the handler locks the system up

2016-10-21 Thread Mason
On 21/10/2016 21:14, Marc Zyngier wrote: > Mason wrote: > >> On 21/10/2016 19:46, Marc Zyngier wrote: >> >>> On 21/10/16 17:37, Mason wrote: >>> On my platform, one HW block pulls the interrupt line high as long as it remains idle, and low when it is busy. The device tree no

Re: Disabling an interrupt in the handler locks the system up

2016-10-21 Thread Marc Zyngier
On Fri, 21 Oct 2016 20:39:41 +0200 Mason wrote: > On 21/10/2016 19:46, Marc Zyngier wrote: > > > On 21/10/16 17:37, Mason wrote: > > > >> On my platform, one HW block pulls the interrupt line high > >> as long as it remains idle, and low when it is busy. > >> > >> The device tree node is: > >>

Re: Disabling an interrupt in the handler locks the system up

2016-10-21 Thread Mason
On 21/10/2016 19:46, Marc Zyngier wrote: > On 21/10/16 17:37, Mason wrote: > >> On my platform, one HW block pulls the interrupt line high >> as long as it remains idle, and low when it is busy. >> >> The device tree node is: >> >> test@2 { >> compatible = "ve

Re: Disabling an interrupt in the handler locks the system up

2016-10-21 Thread Marc Zyngier
On 21/10/16 17:37, Mason wrote: > Hello, > > On my platform, one HW block pulls the interrupt line high > as long as it remains idle, and low when it is busy. > > The device tree node is: > > test@2 { > compatible = "vendor,testme"; >

Disabling an interrupt in the handler locks the system up

2016-10-21 Thread Mason
Hello, On my platform, one HW block pulls the interrupt line high as long as it remains idle, and low when it is busy. The device tree node is: test@2 { compatible = "vendor,testme"; interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;