ia64/xen-unstable

changeset 17773:73a1daa9715f

vtd: build fix.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jun 02 10:03:18 2008 +0100 (2008-06-02)
parents f1508348ffab
children 0216f0d07efe
files xen/drivers/passthrough/vtd/intremap.c
line diff
     1.1 --- a/xen/drivers/passthrough/vtd/intremap.c	Mon Jun 02 11:35:39 2008 +0900
     1.2 +++ b/xen/drivers/passthrough/vtd/intremap.c	Mon Jun 02 10:03:18 2008 +0100
     1.3 @@ -60,7 +60,7 @@ static void remap_entry_to_ioapic_rte(
     1.4      }
     1.5  
     1.6      remap_rte = (struct IO_APIC_route_remap_entry *) old_rte;
     1.7 -    index = (remap_rte->index_15 << 15) + remap_rte->index_0_14;
     1.8 +    index = (remap_rte->index_15 << 15) | remap_rte->index_0_14;
     1.9  
    1.10      if ( index > ir_ctrl->iremap_index )
    1.11          panic("%s: index (%d) is larger than remap table entry size (%d)!\n",
    1.12 @@ -140,7 +140,7 @@ static void ioapic_rte_to_remap_entry(st
    1.13          /* now construct new ioapic rte entry */
    1.14          remap_rte->vector = new_rte.vector;
    1.15          remap_rte->delivery_mode = 0;    /* has to be 0 for remap format */
    1.16 -        remap_rte->index_15 = index & 0x8000;
    1.17 +        remap_rte->index_15 = (index >> 15) & 0x1;
    1.18          remap_rte->index_0_14 = index & 0x7fff;
    1.19  
    1.20          remap_rte->delivery_status = new_rte.delivery_status;
    1.21 @@ -269,7 +269,7 @@ static void remap_entry_to_msi_msg(
    1.22  
    1.23      remap_rte = (struct msi_msg_remap_entry *) msg;
    1.24      index = (remap_rte->address_lo.index_15 << 15) |
    1.25 -            remap_rte->address_lo.index_0_14;
    1.26 +             remap_rte->address_lo.index_0_14;
    1.27  
    1.28      if ( index > ir_ctrl->iremap_index )
    1.29          panic("%s: index (%d) is larger than remap table entry size (%d)\n",
    1.30 @@ -368,7 +368,7 @@ static void msi_msg_to_remap_entry(
    1.31  
    1.32      /* now construct new MSI/MSI-X rte entry */
    1.33      remap_rte->address_lo.dontcare = 0;
    1.34 -    remap_rte->address_lo.index_15 = index & 0x8000;
    1.35 +    remap_rte->address_lo.index_15 = (index >> 15) & 0x1;
    1.36      remap_rte->address_lo.index_0_14 = index & 0x7fff;
    1.37      remap_rte->address_lo.SHV = 1;
    1.38      remap_rte->address_lo.format = 1;