direct-io.hg
changeset 10803:9e12c09a0089
[IA64] fix usage of ia64_xen_vector
Must look up the vector via the GSI to test if it's in use.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Must look up the vector via the GSI to test if it's in use.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author | awilliam@xenbuild.aw |
---|---|
date | Tue Jul 11 12:53:04 2006 -0600 (2006-07-11) |
parents | 306d7857928c |
children | 79a5833d1266 |
files | xen/arch/ia64/linux-xen/iosapic.c |
line diff
1.1 --- a/xen/arch/ia64/linux-xen/iosapic.c Tue Jul 11 12:51:18 2006 -0600 1.2 +++ b/xen/arch/ia64/linux-xen/iosapic.c Tue Jul 11 12:53:04 2006 -0600 1.3 @@ -1155,7 +1155,7 @@ int iosapic_guest_read(unsigned long phy 1.4 1.5 int iosapic_guest_write(unsigned long physbase, unsigned int reg, u32 val) 1.6 { 1.7 - unsigned int id, gsi, vec, dest, high32; 1.8 + unsigned int id, gsi, vec, xen_vec, dest, high32; 1.9 char rte_index; 1.10 struct iosapic *ios; 1.11 struct iosapic_intr_info *info; 1.12 @@ -1185,13 +1185,17 @@ int iosapic_guest_write(unsigned long ph 1.13 1.14 /* Sanity check. Vector should be allocated before this update */ 1.15 if ((rte_index > ios->num_rte) || 1.16 - test_bit(vec, ia64_xen_vector) || 1.17 ((vec > IA64_FIRST_DEVICE_VECTOR) && 1.18 (vec < IA64_LAST_DEVICE_VECTOR) && 1.19 (!test_bit(vec - IA64_FIRST_DEVICE_VECTOR, ia64_vector_mask)))) 1.20 return -EINVAL; 1.21 1.22 gsi = ios->gsi_base + rte_index; 1.23 + xen_vec = gsi_to_vector(gsi); 1.24 + if (xen_vec >= 0 && test_bit(xen_vec, ia64_xen_vector)) { 1.25 + printk("WARN: GSI %d in use by Xen.\n", gsi); 1.26 + return -EINVAL; 1.27 + } 1.28 info = &iosapic_intr_info[vec]; 1.29 spin_lock_irqsave(&irq_descp(vec)->lock, flags); 1.30 spin_lock(&iosapic_lock);