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


Groups > linux.kernel > #1506267

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

From Mason <slash.tmp@free.fr>
Newsgroups linux.kernel
Subject Re: Disabling an interrupt in the handler locks the system up
Date 2016-10-21 22:30 +0200
Message-ID <suOBY-2ad-11@gated-at.bofh.it> (permalink)
References (1 earlier) <suM78-oJ-19@gated-at.bofh.it> <suN3b-12J-15@gated-at.bofh.it> <suNwe-1sv-13@gated-at.bofh.it> <suNZf-1D0-15@gated-at.bofh.it> <suO8V-1Gu-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 point, you can put anything you want in
>>> your DT.
>>
>> If I understand correctly, you are saying that I should have
>> specified IRQ_TYPE_LEVEL_LOW, instead of IRQ_TYPE_LEVEL_HIGH?
>>
>> If the HW outputs 1 when idle, and 0 when busy, that
>> is level low? (Sorry if this is obvious, I'm absolutely
>> clueless in this subject matter.)
> 
> We describe the level which is raising the interrupt. So in your case the
> line goes to 0 when the interrupt is active, so the level is LOW.

I see. I'll try that on Monday.

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.

Obviously, the hardware being idle (line high) is not an urgent
matter which interests the CPU. Likewise, I'm not sure the CPU
cares that the hardware is busy (line low). It seems to me the
interesting event from the CPU's perspective is when the
hardware completes a "task" (transition from low to high).

So I had originally configured the interrupt as IRQ_TYPE_EDGE_RISING.
(There is an edge detection block in the irqchip, but the HW designer
warned me that at low frequencies, it is possible to "miss" some edges,
and we should prefer level triggers if possible.)

Regards.

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


Thread

Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-21 18:40 +0200
  Re: Disabling an interrupt in the handler locks the system up Marc Zyngier <marc.zyngier@arm.com> - 2016-10-21 19:50 +0200
    Re: Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-21 20:50 +0200
      Re: Disabling an interrupt in the handler locks the system up Marc Zyngier <marc.zyngier@arm.com> - 2016-10-21 21:20 +0200
        Re: Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-21 21:50 +0200
          Re: Disabling an interrupt in the handler locks the system up Thomas Gleixner <tglx@linutronix.de> - 2016-10-21 22:00 +0200
            Re: Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-21 22:30 +0200
              Re: Disabling an interrupt in the handler locks the system up Marc Zyngier <marc.zyngier@arm.com> - 2016-10-22 13:40 +0200
                Re: Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-23 01:20 +0200
                Re: Disabling an interrupt in the handler locks the system up Marc Zyngier <marc.zyngier@arm.com> - 2016-10-24 10:20 +0200
                Re: Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-24 18:20 +0200
                Re: Disabling an interrupt in the handler locks the system up Thomas Gleixner <tglx@linutronix.de> - 2016-10-24 19:00 +0200
                Re: Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-25 10:40 +0200
                Re: Disabling an interrupt in the handler locks the system up Marc Zyngier <marc.zyngier@arm.com> - 2016-10-25 12:50 +0200
                Re: Disabling an interrupt in the handler locks the system up Mason <slash.tmp@free.fr> - 2016-10-25 16:00 +0200
                Re: Disabling an interrupt in the handler locks the system up Thomas Gleixner <tglx@linutronix.de> - 2016-10-25 16:00 +0200
                Re: Disabling an interrupt in the handler locks the system up Sebastian Frias <sf84@laposte.net> - 2016-10-25 11:00 +0200
                Re: Disabling an interrupt in the handler locks the system up Thomas Gleixner <tglx@linutronix.de> - 2016-10-25 11:30 +0200

csiph-web