From: Andrew Patterson <andrew.patterson@hp.com>
To: linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org
Cc: andrew.patterson@hp.com, matthew@wil.cx
Subject: [PATCH 6/8] PCI: added pci_msi_enabled which checks for pci=nomsi
Date: Tue, 28 Oct 2008 23:48:46 -0600 [thread overview]
Message-ID: <20081029054846.2263.59248.stgit@bob.kio> (raw)
In-Reply-To: <20081029054815.2263.40833.stgit@bob.kio>
PCI: added pci_msi_enabled which checks for pci=nomsi
The pci_msi_enabled() function is used to check whether pci=nomsi
is set on the kernel command-line.
Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
---
drivers/pci/msi.c | 12 ++++++++++++
include/linux/pci.h | 5 +++++
2 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d281201..0e8dae1 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -755,6 +755,18 @@ void pci_no_msi(void)
pci_msi_enable = 0;
}
+/**
+ * pci_msi_enabled - is MSI enabled?
+ *
+ * Returns true if MSI has not been disabled by the command-line option
+ * pci=nomsi.
+ **/
+int pci_msi_enabled(void)
+{
+ return pci_msi_enable;
+}
+EXPORT_SYMBOL(pci_msi_enabled);
+
void pci_msi_init_pci_dev(struct pci_dev *dev)
{
INIT_LIST_HEAD(&dev->msi_list);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 752def8..8d0513e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -767,6 +767,10 @@ static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev)
static inline void pci_restore_msi_state(struct pci_dev *dev)
{ }
+static inline int pci_msi_enabled(void)
+{
+ return 0;
+}
#else
extern int pci_enable_msi(struct pci_dev *dev);
extern void pci_msi_shutdown(struct pci_dev *dev);
@@ -777,6 +781,7 @@ extern void pci_msix_shutdown(struct pci_dev *dev);
extern void pci_disable_msix(struct pci_dev *dev);
extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
extern void pci_restore_msi_state(struct pci_dev *dev);
+extern int pci_msi_enabled(void);
#endif
#ifdef CONFIG_HT_IRQ
next prev parent reply other threads:[~2008-10-29 5:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 5:48 [PATCH 0/8] call _OSC support during root bridge discovery Andrew Patterson
2008-10-29 5:48 ` [PATCH 1/8] PCI, ACPI: include missing acpi.h file in pci-acpi.h Andrew Patterson
2008-10-29 5:48 ` [PATCH 2/8] ACPI, PCI: call _OSC support during root bridge discovery Andrew Patterson
2008-10-29 14:30 ` Bjorn Helgaas
2008-10-29 20:28 ` Andrew Patterson
2008-10-29 5:48 ` [PATCH 3/8] ACPI, PCI: PCIe ASPM _OSC support capabilities called when root bridge added Andrew Patterson
2008-10-29 6:06 ` Kenji Kaneshige
2008-10-29 16:19 ` Andrew Patterson
2008-10-29 22:57 ` Andrew Patterson
2008-10-29 5:48 ` [PATCH 4/8] ACPI, PCI: PCIe AER " Andrew Patterson
2008-10-29 5:48 ` [PATCH 5/8] ACPI, PCI: PCI MSI " Andrew Patterson
2008-10-29 5:48 ` Andrew Patterson [this message]
2008-10-29 14:33 ` [PATCH 6/8] PCI: added pci_msi_enabled which checks for pci=nomsi Bjorn Helgaas
2008-10-29 21:36 ` Andrew Patterson
2008-10-29 5:48 ` [PATCH 7/8] PCI: check if MSI is enabled before adding _OSC support capability Andrew Patterson
2008-10-29 6:19 ` Kenji Kaneshige
2008-10-30 4:51 ` Andrew Patterson
2008-10-29 14:33 ` Bjorn Helgaas
2008-10-29 21:57 ` Andrew Patterson
2008-10-29 5:48 ` [PATCH 8/8] PCI, ACPI: remove obsolete _OSC capability support functions Andrew Patterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081029054846.2263.59248.stgit@bob.kio \
--to=andrew.patterson@hp.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.