WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Consolidate MSI-X related definitions

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Consolidate MSI-X related definitions
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 Jul 2010 10:25:27 -0700
Delivery-date: Tue, 13 Jul 2010 10:27:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1278928114 -3600
# Node ID f12837d7a50e3e5f843bd1a7113bb329661c7dd0
# Parent  03f5833933004141acf5b303f3306c52289e9f4f
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@xxxxxxxxxx>
---
 xen/arch/x86/msi.c         |    4 ++--
 xen/include/asm-x86/msi.h  |   17 ++++-------------
 xen/include/xen/pci_regs.h |    7 +++++--
 3 files changed, 11 insertions(+), 17 deletions(-)

diff -r 03f583393300 -r f12837d7a50e xen/arch/x86/msi.c
--- a/xen/arch/x86/msi.c        Mon Jul 12 10:48:04 2010 +0100
+++ b/xen/arch/x86/msi.c        Mon Jul 12 10:48:34 2010 +0100
@@ -560,8 +560,8 @@ static int msix_capability_init(struct p
 
     /* Request & Map MSI-X table region */
     table_offset = pci_conf_read32(bus, slot, func, 
msix_table_offset_reg(pos));
-    bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
-    table_offset &= ~PCI_MSIX_FLAGS_BIRMASK;
+    bir = (u8)(table_offset & PCI_MSIX_BIRMASK);
+    table_offset &= ~PCI_MSIX_BIRMASK;
     entry_offset = msi->entry_nr * PCI_MSIX_ENTRY_SIZE;
 
     table_paddr = msi->table_base + table_offset;
diff -r 03f583393300 -r f12837d7a50e xen/include/asm-x86/msi.h
--- a/xen/include/asm-x86/msi.h Mon Jul 12 10:48:04 2010 +0100
+++ b/xen/include/asm-x86/msi.h Mon Jul 12 10:48:34 2010 +0100
@@ -118,14 +118,6 @@ int msi_free_irq(struct msi_desc *entry)
 #define NR_HP_RESERVED_VECTORS         20
 
 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
@@ -151,15 +143,14 @@ extern const struct hw_interrupt_type pc
        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
diff -r 03f583393300 -r f12837d7a50e xen/include/xen/pci_regs.h
--- a/xen/include/xen/pci_regs.h        Mon Jul 12 10:48:04 2010 +0100
+++ b/xen/include/xen/pci_regs.h        Mon Jul 12 10:48:34 2010 +0100
@@ -301,8 +301,11 @@
 #define  PCI_MSIX_FLAGS_QSIZE  0x7FF
 #define  PCI_MSIX_FLAGS_ENABLE (1 << 15)
 #define  PCI_MSIX_FLAGS_MASKALL        (1 << 14)
-#define PCI_MSIX_FLAGS_BIRMASK (7 << 0)
-#define PCI_MSIX_FLAGS_BITMASK (1 << 0)
+#define PCI_MSIX_TABLE         4
+#define PCI_MSIX_PBA           8
+#define  PCI_MSIX_BIRMASK      (7 << 0)
+
+#define PCI_MSIX_VECTOR_BITMASK        (1 << 0)
 
 /* CompactPCI Hotswap Register */
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Consolidate MSI-X related definitions, Xen patchbot-unstable <=