summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2009-03-17 08:54:08 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-03-20 10:48:13 -0700
commit264d9caaa1c574c0274b019a810abfe957391005 (patch)
tree06ac3d9df11a0e64e2f8571145e8865424fb7dc6 /drivers/pci
parent379f5327a86f7822a51ec7d088a085167724df75 (diff)
downloadop-kernel-dev-264d9caaa1c574c0274b019a810abfe957391005.zip
op-kernel-dev-264d9caaa1c574c0274b019a810abfe957391005.tar.gz
PCI MSI: Use mask_pos instead of mask_base when appropriate
MSI interrupts have a mask_pos where MSI-X have a mask_base. Use a transparent union to get rid of some ugly casts. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index a658c0f..fcde04d 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -145,7 +145,7 @@ static int msi_set_mask_bits(struct irq_desc *desc, u32 mask, u32 flag)
if (!entry->msi_attrib.maskbit)
return 0;
- pos = (long)entry->mask_base;
+ pos = entry->mask_pos;
pci_read_config_dword(entry->dev, pos, &mask_bits);
mask_bits &= ~mask;
mask_bits |= flag & mask;
@@ -363,8 +363,7 @@ static int msi_capability_init(struct pci_dev *dev)
unsigned int base, maskbits, temp;
base = msi_mask_bits_reg(pos, entry->msi_attrib.is_64);
- entry->mask_base = (void __iomem *)(long)base;
-
+ entry->mask_pos = base;
/* All MSIs are unmasked by default, Mask them all */
pci_read_config_dword(dev, base, &maskbits);
temp = msi_mask((control & PCI_MSI_FLAGS_QMASK) >> 1);
OpenPOWER on IntegriCloud