aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/msi.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-07-12 10:48:34 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-07-12 10:48:34 +0100
commit7d343d0e53c881bb6b78db2bf29d584eee467bbf (patch)
tree5400d8e40f1400508c3e809aa5efba14663edf31 /xen/include/asm-x86/msi.h
parentb298f3d27fecd3c896b69529b5603e5879f55749 (diff)
downloadxen-7d343d0e53c881bb6b78db2bf29d584eee467bbf.tar.gz
xen-7d343d0e53c881bb6b78db2bf29d584eee467bbf.tar.bz2
xen-7d343d0e53c881bb6b78db2bf29d584eee467bbf.zip
Consolidate MSI-X related definitions
Eliminate redundant ones, fix names (where so far inappropriately referring to capability structure fields the don't really relate to), use symbolic names instead of raw numbers, and remove an unusable one. No functional change intended. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/asm-x86/msi.h')
-rw-r--r--xen/include/asm-x86/msi.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h
index bc8ab0e870..0848616b29 100644
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -119,14 +119,6 @@ int msi_free_irq(struct msi_desc *entry);
extern const struct hw_interrupt_type pci_msi_type;
-/*
- * MSI-X Address Register
- */
-#define PCI_MSIX_FLAGS_QSIZE 0x7FF
-#define PCI_MSIX_FLAGS_ENABLE (1 << 15)
-#define PCI_MSIX_FLAGS_BIRMASK (7 << 0)
-#define PCI_MSIX_FLAGS_BITMASK (1 << 0)
-
#define PCI_MSIX_ENTRY_SIZE 16
#define PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET 0
#define PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET 4
@@ -151,15 +143,14 @@ extern const struct hw_interrupt_type pci_msi_type;
control |= PCI_MSI_FLAGS_ENABLE
#define msix_control_reg(base) (base + PCI_MSIX_FLAGS)
-#define msix_table_offset_reg(base) (base + 0x04)
-#define msix_pba_offset_reg(base) (base + 0x08)
+#define msix_table_offset_reg(base) (base + PCI_MSIX_TABLE)
+#define msix_pba_offset_reg(base) (base + PCI_MSIX_PBA)
#define msix_enable(control) control |= PCI_MSIX_FLAGS_ENABLE
#define msix_disable(control) control &= ~PCI_MSIX_FLAGS_ENABLE
#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1)
#define multi_msix_capable msix_table_size
-#define msix_unmask(address) (address & ~PCI_MSIX_FLAGS_BITMASK)
-#define msix_mask(address) (address | PCI_MSIX_FLAGS_BITMASK)
-#define msix_is_pending(address) (address & PCI_MSIX_FLAGS_PENDMASK)
+#define msix_unmask(address) (address & ~PCI_MSIX_VECTOR_BITMASK)
+#define msix_mask(address) (address | PCI_MSIX_VECTOR_BITMASK)
/*
* MSI Defined Data Structures