summaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-05-07 09:52:21 -0500
committerBjorn Helgaas <bhelgaas@google.com>2015-05-07 09:52:21 -0500
commit6a25f5e35ab742380742ebf2033f6d53518219db (patch)
tree1dd947c5281467ad75450d7261c1d4fd2ec0f4b9 /drivers/pci/msi.c
parent61b64abd399fa4b15ac649ad93b453d2a8569314 (diff)
downloadlinux-6a25f5e35ab742380742ebf2033f6d53518219db.tar.gz
linux-6a25f5e35ab742380742ebf2033f6d53518219db.tar.bz2
linux-6a25f5e35ab742380742ebf2033f6d53518219db.zip
PCI/MSI: Export pci_msi_set_enable(), pci_msix_clear_and_set_ctrl()
Move pci_msi_set_enable() and pci_msix_clear_and_set_ctrl() to drivers/pci/pci.h so they're available even when MSI isn't configured into the kernel. No functional change. [bhelgaas: changelog, split into separate patch] Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 6cd366058ec4..9942f6827a4a 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -185,27 +185,6 @@ void __weak arch_restore_msi_irqs(struct pci_dev *dev)
return default_restore_msi_irqs(dev);
}
-static void pci_msi_set_enable(struct pci_dev *dev, int enable)
-{
- u16 control;
-
- pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &control);
- control &= ~PCI_MSI_FLAGS_ENABLE;
- if (enable)
- control |= PCI_MSI_FLAGS_ENABLE;
- pci_write_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, control);
-}
-
-static void pci_msix_clear_and_set_ctrl(struct pci_dev *dev, u16 clear, u16 set)
-{
- u16 ctrl;
-
- pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &ctrl);
- ctrl &= ~clear;
- ctrl |= set;
- pci_write_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, ctrl);
-}
-
static inline __attribute_const__ u32 msi_mask(unsigned x)
{
/* Don't shift by >= width of type */