aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/msi.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-07-12 10:43:57 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-07-12 10:43:57 +0100
commitf94b08c2f634ac5bd4304fa55f4fd37f417064a0 (patch)
treea4f24025878d49e6587870b51ed5992f186776d0 /xen/arch/x86/msi.c
parentc507b364854c06cc818b62e24ac9df08b92be9ba (diff)
downloadxen-f94b08c2f634ac5bd4304fa55f4fd37f417064a0.tar.gz
xen-f94b08c2f634ac5bd4304fa55f4fd37f417064a0.tar.bz2
xen-f94b08c2f634ac5bd4304fa55f4fd37f417064a0.zip
x86: allow the MSI-X table to reside beyond 4G even on 32-bit systems
Underlying interfaces allow this, and unduly (and silently) truncating addresses doesn't seem nice. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/msi.c')
-rw-r--r--xen/arch/x86/msi.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 4f16bf23c4..ec7e5c9c06 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -57,10 +57,11 @@ static void msix_fixmap_free(int idx)
spin_unlock(&msix_fixmap_lock);
}
-static int msix_get_fixmap(struct pci_dev *dev, unsigned long table_paddr,
- unsigned long entry_paddr)
+static int msix_get_fixmap(struct pci_dev *dev, u64 table_paddr,
+ u64 entry_paddr)
{
- int nr_page, idx;
+ long nr_page;
+ int idx;
nr_page = (entry_paddr >> PAGE_SHIFT) - (table_paddr >> PAGE_SHIFT);
@@ -536,7 +537,7 @@ static int msix_capability_init(struct pci_dev *dev,
struct msi_desc *entry;
int pos;
u16 control;
- unsigned long table_paddr, entry_paddr;
+ u64 table_paddr, entry_paddr;
u32 table_offset, entry_offset;
u8 bir;
void __iomem *base;
@@ -571,7 +572,8 @@ static int msix_capability_init(struct pci_dev *dev,
xfree(entry);
return idx;
}
- base = (void *)(fix_to_virt(idx) + (entry_paddr & ((1UL << PAGE_SHIFT) - 1)));
+ base = (void *)(fix_to_virt(idx) +
+ ((unsigned long)entry_paddr & ((1UL << PAGE_SHIFT) - 1)));
entry->msi_attrib.type = PCI_CAP_ID_MSIX;
entry->msi_attrib.is_64 = 1;