aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2013-04-17 19:58:47 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-04-23 11:50:30 -0400
commit78b5a310ce0ff22889e1a1af932e5c17b26962ba (patch)
treec50d2512660eac0a584cb57ec88b95d379489e3b
parent527eee292d2ee69708a20b90049ef49bdeefc882 (diff)
PCI: Drop msi_mask_reg() and remove drivers/pci/msi.h
msi_mask_reg() doesn't provide any useful abstraction, do drop it. Remove the now-empty drivers/pci/msi.h. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r--drivers/pci/msi.c4
-rw-r--r--drivers/pci/msi.h12
2 files changed, 2 insertions, 14 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 06c5f6edb150..afdc388b9553 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -22,7 +22,6 @@
22#include <linux/slab.h> 22#include <linux/slab.h>
23 23
24#include "pci.h" 24#include "pci.h"
25#include "msi.h"
26 25
27static int pci_msi_enable = 1; 26static int pci_msi_enable = 1;
28 27
@@ -564,7 +563,8 @@ static int msi_capability_init(struct pci_dev *dev, int nvec)
564 entry->msi_attrib.default_irq = dev->irq; /* Save IOAPIC IRQ */ 563 entry->msi_attrib.default_irq = dev->irq; /* Save IOAPIC IRQ */
565 entry->msi_attrib.pos = dev->msi_cap; 564 entry->msi_attrib.pos = dev->msi_cap;
566 565
567 entry->mask_pos = msi_mask_reg(dev->msi_cap, entry->msi_attrib.is_64); 566 entry->mask_pos = dev->msi_cap + (control & PCI_MSI_FLAGS_64BIT) ?
567 PCI_MSI_MASK_64 : PCI_MSI_MASK_32;
568 /* All MSIs are unmasked by default, Mask them all */ 568 /* All MSIs are unmasked by default, Mask them all */
569 if (entry->msi_attrib.maskbit) 569 if (entry->msi_attrib.maskbit)
570 pci_read_config_dword(dev, entry->mask_pos, &entry->masked); 570 pci_read_config_dword(dev, entry->mask_pos, &entry->masked);
diff --git a/drivers/pci/msi.h b/drivers/pci/msi.h
deleted file mode 100644
index df128309f837..000000000000
--- a/drivers/pci/msi.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * Copyright (C) 2003-2004 Intel
3 * Copyright (C) Tom Long Nguyen (tom.l.nguyen@intel.com)
4 */
5
6#ifndef MSI_H
7#define MSI_H
8
9#define msi_mask_reg(base, is64bit) \
10 (base + ((is64bit == 1) ? PCI_MSI_MASK_64 : PCI_MSI_MASK_32))
11
12#endif /* MSI_H */