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

[PATCH] x86/msi: Fold pci_conf_write16() calls in write_msi_msg()


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 22 Sep 2020 20:16:43 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 22 Sep 2020 19:17:36 +0000
  • Ironport-sdr: +CSamO9UpQgkb+7thSz33rASDpeanYTLDksu+JuOOmJYT1sfICs6gcxK7bpIi772QOPJljiAXs mslx7XZXwKn+bFkfPM1Sda9id0n1JdgErPQS8p1dPEiThW/lx/aWLfSJUEfsnknerw73vSmJ4V FfxgGjx4RKoygRaT2qWQ5ZrNBR8iUIZdoTXHWVdyjO93Mot+1qMyl5ED6OFV5BP01pOdmWxu0L BC4osNMJHn3XwwhJ+w3iXA/bCNBqaL2Gd5hO+MipHleep/wGY0OTRqUOtBiFZvwj1kOxYvmYDu a2I=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

In addition, this removes the unqualified 0/1 passed to msi_data_reg()

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
 xen/arch/x86/msi.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c
index a899c43e8d..5febc0ea4b 100644
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -214,13 +214,10 @@ static int write_msi_msg(struct msi_desc *entry, struct 
msi_msg *msg)
         pci_conf_write32(dev->sbdf, msi_lower_address_reg(pos),
                          msg->address_lo);
         if ( entry->msi_attrib.is_64 )
-        {
             pci_conf_write32(dev->sbdf, msi_upper_address_reg(pos),
                              msg->address_hi);
-            pci_conf_write16(dev->sbdf, msi_data_reg(pos, 1), msg->data);
-        }
-        else
-            pci_conf_write16(dev->sbdf, msi_data_reg(pos, 0), msg->data);
+        pci_conf_write16(dev->sbdf, msi_data_reg(pos, entry->msi_attrib.is_64),
+                         msg->data);
         break;
     }
     case PCI_CAP_ID_MSIX:
-- 
2.11.0




 


Rackspace

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