[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] Revert "x86/MSI-X: use qword MMIO access for address writes"



commit c8b630fedf285cc85b9a4834a0eb74cda7c3cca2
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Jun 15 11:32:28 2015 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Jun 15 11:32:28 2015 +0200

    Revert "x86/MSI-X: use qword MMIO access for address writes"
    
    This reverts commit 73cb5d43a8f48930e4594ef7b15b974487651ffe,
    which appears to break with certain Tigon3 NICs.
---
 xen/arch/x86/msi.c         |    8 ++++++--
 xen/include/asm-x86/msi.h  |    9 ++-------
 xen/include/xen/pci_regs.h |    1 -
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index 3527518..e89f326 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -198,7 +198,8 @@ static void read_msi_msg(struct msi_desc *entry, struct 
msi_msg *msg)
         void __iomem *base;
         base = entry->mask_base;
 
-        msg->address = readq(base + PCI_MSIX_ENTRY_ADDRESS_OFFSET);
+        msg->address_lo = readl(base + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
+        msg->address_hi = readl(base + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
         msg->data = readl(base + PCI_MSIX_ENTRY_DATA_OFFSET);
         break;
     }
@@ -259,7 +260,10 @@ static int write_msi_msg(struct msi_desc *entry, struct 
msi_msg *msg)
         void __iomem *base;
         base = entry->mask_base;
 
-        writeq(msg->address, base + PCI_MSIX_ENTRY_ADDRESS_OFFSET);
+        writel(msg->address_lo,
+               base + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
+        writel(msg->address_hi,
+               base + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
         writel(msg->data, base + PCI_MSIX_ENTRY_DATA_OFFSET);
         break;
     }
diff --git a/xen/include/asm-x86/msi.h b/xen/include/asm-x86/msi.h
index abbecf8..4c62a3a 100644
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -65,13 +65,8 @@ struct msi_info {
 };
 
 struct msi_msg {
-       union {
-               u64     address; /* message address */
-               struct {
-                       u32     address_lo; /* message address low 32 bits */
-                       u32     address_hi; /* message address high 32 bits */
-               };
-       };
+       u32     address_lo;     /* low 32 bits of msi message address */
+       u32     address_hi;     /* high 32 bits of msi message address */
        u32     data;           /* 16 bits of msi message data */
        u32     dest32;         /* used when Interrupt Remapping with EIM is 
enabled */
 };
diff --git a/xen/include/xen/pci_regs.h b/xen/include/xen/pci_regs.h
index 2de7847..ecd6124 100644
--- a/xen/include/xen/pci_regs.h
+++ b/xen/include/xen/pci_regs.h
@@ -307,7 +307,6 @@
 #define  PCI_MSIX_BIRMASK      (7 << 0)
 
 #define PCI_MSIX_ENTRY_SIZE                    16
-#define  PCI_MSIX_ENTRY_ADDRESS_OFFSET         0
 #define  PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET      0
 #define  PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET      4
 #define  PCI_MSIX_ENTRY_DATA_OFFSET            8
--
generated by git-patchbot for /home/xen/git/xen.git#master

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.