Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbbB0Lt4 (ORCPT ); Fri, 27 Feb 2015 06:49:56 -0500 Received: from osiris.lip6.fr ([132.227.60.30]:58063 "EHLO osiris.lip6.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750777AbbB0Lty (ORCPT ); Fri, 27 Feb 2015 06:49:54 -0500 X-pt: osiris.lip6.fr From: Valentin Rothberg To: corbet@lwn.net, bhelgaas@google.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Valentin Rothberg Subject: [PATCH] MSI-HOWTO.txt: remove reference on IRQF_DISABLED Date: Fri, 27 Feb 2015 12:49:38 +0100 Message-Id: <1425037778-19028-1-git-send-email-Valentin.Rothberg@lip6.fr> X-Mailer: git-send-email 1.9.1 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (osiris.lip6.fr [132.227.60.30]); Fri, 27 Feb 2015 12:49:45 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2043 Lines: 44 The IRQF_DISABLED is a NOOP and scheduled to be removed. According to Ingo Molnar (e58aa3d2d0cc01ad8d6f7f640a0670433f794922) 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 --- Documentation/PCI/MSI-HOWTO.txt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index 0d920d5..a78bfca 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt @@ -501,13 +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. +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). 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 -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/