From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCH 4/4] AMD IOMMU: use __ioapic_read_entry() instead of open coding it Date: Fri, 15 Feb 2013 12:28:23 -0500 Message-ID: <511E7037.7040603@oracle.com> References: <511E6CAD02000078000BED19@nat28.tlf.novell.com> <511E6EEA02000078000BED56@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <511E6EEA02000078000BED56@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Sherry Hurwitz , xen-devel List-Id: xen-devel@lists.xenproject.org On 02/15/2013 11:22 AM, Jan Beulich wrote: > Signed-off-by: Jan Beulich Acked-by: Boris Ostrovsky > > --- 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_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; > > > >