diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-02-18 09:38:25 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-02-18 09:38:25 +0100 |
commit | d551606308f3cbcce58a32a0850d1c4a8f6d2088 (patch) | |
tree | 6a370e94a7fe03b9e837a448f11937b65b823bdd /xen/drivers/passthrough | |
parent | f547d42ec0306cdceffb8f7603c7e6f8977cf398 (diff) | |
download | xen-d551606308f3cbcce58a32a0850d1c4a8f6d2088.tar.gz xen-d551606308f3cbcce58a32a0850d1c4a8f6d2088.tar.bz2 xen-d551606308f3cbcce58a32a0850d1c4a8f6d2088.zip |
AMD IOMMU: use __ioapic_read_entry() instead of open coding it
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Diffstat (limited to 'xen/drivers/passthrough')
-rw-r--r-- | xen/drivers/passthrough/amd/iommu_intr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/amd/iommu_intr.c index 4ae5a54079..49ed3a2ab2 100644 --- a/xen/drivers/passthrough/amd/iommu_intr.c +++ b/xen/drivers/passthrough/amd/iommu_intr.c @@ -144,7 +144,7 @@ static void update_intremap_entry_from_ioapic( 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_remapping(void) { 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; |