aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/PCI
diff options
context:
space:
mode:
authorValentin Rothberg <Valentin.Rothberg@lip6.fr>2015-02-27 06:55:16 -0500
committerJonathan Corbet <corbet@lwn.net>2015-03-20 09:41:55 -0400
commit2f9d7389b5e243abd0c42995a703c4f7cf535af4 (patch)
treeceae1b6569ea4af8cbba5196f4900ed968b852ab /Documentation/PCI
parent9ddfa69fb073081882505a4f69d3f0c344d9bcaf (diff)
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 e58aa3d2d0cc01ad8d6f7f640a0670433f794922 (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: Valentin Rothberg <Valentin.Rothberg@lip6.fr> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'Documentation/PCI')
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt15
1 files changed, 3 insertions, 12 deletions
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index 0d920d54536d..63def8ef546d 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -501,18 +501,9 @@ necessary to disable interrupts (Linux guarantees the same interrupt will
501not be re-entered). If a device uses multiple interrupts, the driver 501not be re-entered). If a device uses multiple interrupts, the driver
502must disable interrupts while the lock is held. If the device sends 502must disable interrupts while the lock is held. If the device sends
503a different interrupt, the driver will deadlock trying to recursively 503a different interrupt, the driver will deadlock trying to recursively
504acquire the spinlock. 504acquire the spinlock. Such deadlocks can be avoided by using
505 505spin_lock_irqsave() or spin_lock_irq() which disable local interrupts
506There are two solutions. The first is to take the lock with 506and acquire the lock (see Documentation/DocBook/kernel-locking).
507spin_lock_irqsave() or spin_lock_irq() (see
508Documentation/DocBook/kernel-locking). The second is to specify
509IRQF_DISABLED to request_irq() so that the kernel runs the entire
510interrupt routine with interrupts disabled.
511
512If your MSI interrupt routine does not hold the lock for the whole time
513it is running, the first solution may be best. The second solution is
514normally preferred as it avoids making two transitions from interrupt
515disabled to enabled and back again.
516 507
5174.6 How to tell whether MSI/MSI-X is enabled on a device 5084.6 How to tell whether MSI/MSI-X is enabled on a device
518 509