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

[Xen-changelog] [xen-unstable] AMD IOMMU: use __ioapic_read_entry() instead of open coding it


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-unstable <patchbot@xxxxxxx>
  • Date: Tue, 19 Feb 2013 15:22:34 +0000
  • Delivery-date: Tue, 19 Feb 2013 15:22:38 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxx>
# Date 1361176705 -3600
# Node ID 620e5d3aa7cd0b513125bf1f4270aa29daea9d69
# Parent  57e67af5281a6b66cf71dfa812e4335930684fd6
AMD IOMMU: use __ioapic_read_entry() instead of open coding it

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
---


diff -r 57e67af5281a -r 620e5d3aa7cd xen/drivers/passthrough/amd/iommu_intr.c
--- a/xen/drivers/passthrough/amd/iommu_intr.c  Mon Feb 18 09:37:35 2013 +0100
+++ b/xen/drivers/passthrough/amd/iommu_intr.c  Mon Feb 18 09:38:25 2013 +0100
@@ -144,7 +144,7 @@ static void update_intremap_entry_from_i
 
 int __init amd_iommu_setup_ioapic_remapping(void)
 {
-    struct IO_APIC_route_entry rte = {0};
+    struct IO_APIC_route_entry rte;
     unsigned long flags;
     u32* entry;
     int apic, pin;
@@ -159,9 +159,7 @@ int __init amd_iommu_setup_ioapic_remapp
     {
         for ( pin = 0; pin < nr_ioapic_entries[apic]; pin++ )
         {
-            *(((int *)&rte) + 1) = io_apic_read(apic, 0x11 + 2 * pin);
-            *(((int *)&rte) + 0) = io_apic_read(apic, 0x10 + 2 * pin);
-
+            rte = __ioapic_read_entry(apic, pin, 1);
             if ( rte.mask == 1 )
                 continue;
 

_______________________________________________
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®.