提交 2f9d7389 编写于 作者: V Valentin Rothberg 提交者: Jonathan Corbet

MSI-HOWTO.txt: remove reference on IRQF_DISABLED

The IRQF_DISABLED is a NOOP and scheduled to be removed.  According to Ingo
Molnar in commit e58aa3d2 (genirq: Run irq
handlers with interrupts disabled), running IRQ handlers with interrupts
enabled can cause stack overflows when the interrupt line of the issuing
device is still active.

This patch removes IRQF_DISABLED from this documentation.  It was
mentioned to be a solution to avoid deadlocks when a device uses
multiple interrupts.  As the flag is a NOOP this solution does not work
anymore.
Signed-off-by: NValentin Rothberg <Valentin.Rothberg@lip6.fr>
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 9ddfa69f
......@@ -501,18 +501,9 @@ necessary to disable interrupts (Linux guarantees the same interrupt will
not be re-entered). If a device uses multiple interrupts, the driver
must disable interrupts while the lock is held. If the device sends
a different interrupt, the driver will deadlock trying to recursively
acquire the spinlock.
There are two solutions. The first is to take the lock with
spin_lock_irqsave() or spin_lock_irq() (see
Documentation/DocBook/kernel-locking). The second is to specify
IRQF_DISABLED to request_irq() so that the kernel runs the entire
interrupt routine with interrupts disabled.
If your MSI interrupt routine does not hold the lock for the whole time
it is running, the first solution may be best. The second solution is
normally preferred as it avoids making two transitions from interrupt
disabled to enabled and back again.
acquire the spinlock. Such deadlocks can be avoided by using
spin_lock_irqsave() or spin_lock_irq() which disable local interrupts
and acquire the lock (see Documentation/DocBook/kernel-locking).
4.6 How to tell whether MSI/MSI-X is enabled on a device
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册