82a83,86 > #ifdef CONFIG_XEN > #include > #include > #endif 143a148,176 > #ifdef CONFIG_XEN > static void > xen_iosapic_write (struct iosapic_rte_info *rte, unsigned char off, u32 val) > { > physdev_op_t op; > > op.cmd = PHYSDEVOP_APIC_WRITE; > op.u.apic_op.apic = rte->gsi_base + rte->rte_index; > op.u.apic_op.offset = off; > op.u.apic_op.value = val; > > HYPERVISOR_physdev_op (&op); > } > > static void > xen_iosapic_eoi (struct iosapic_rte_info *rte, unsigned int vec) > { > physdev_op_t op; > > op.cmd = PHYSDEVOP_APIC_WRITE; > op.u.apic_op.apic = rte->gsi_base + rte->rte_index; > op.u.apic_op.offset = IOSAPIC_EOI; > op.u.apic_op.value = vec; > > HYPERVISOR_physdev_op (&op); > } > > #endif /* CONFIG_XEN */ > 256,257c289,299 < iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index), high32); < iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32); --- > #ifdef CONFIG_XEN > if (running_on_xen) { > xen_iosapic_write (rte, 1, high32); > xen_iosapic_write (rte, 0, low32); > } > else > #endif > { > iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index), high32); > iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32); > } 288c330,337 < iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32); --- > > #ifdef CONFIG_XEN > if (running_on_xen) > xen_iosapic_write (rte, 0, low32); > else > #endif > iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), > low32); 313c362,368 < iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32); --- > #ifdef CONFIG_XEN > if (running_on_xen) > xen_iosapic_write (rte, 0, low32); > else > #endif > iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), > low32); 364,365c419,430 < iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index), high32); < iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), low32); --- > #ifdef CONFIG_XEN > if (running_on_xen) { > xen_iosapic_write (rte, 1, high32); > xen_iosapic_write (rte, 0, low32); > } > else > #endif > { > iosapic_write(addr, IOSAPIC_RTE_HIGH(rte_index), high32); > iosapic_write(addr, IOSAPIC_RTE_LOW(rte_index), > low32); > } 391c456,461 < iosapic_eoi(rte->addr, vec); --- > #ifdef CONFIG_XEN > if (running_on_xen) > xen_iosapic_eoi (rte, vec); > else > #endif > iosapic_eoi(rte->addr, vec); 816c886,893 < iosapic_write(rte->addr, IOSAPIC_RTE_LOW(rte->rte_index), low32); --- > #ifdef CONFIG_XEN > if (running_on_xen) > xen_iosapic_write (rte, 0, low32); > else > #endif > > iosapic_write(rte->addr, > IOSAPIC_RTE_LOW(rte->rte_index), low32);