[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: fix port selection shifts
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1210242442 -3600 # Node ID 72e70f9041c2c5c4f3d3591f252bcf6dcda7da63 # Parent 36694cae3927bea2934871d287dd1ec0c9912e3d minios: fix port selection shifts Event selectors span unsigned longs, whose size is not always 32 bits. Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx> --- extras/mini-os/hypervisor.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff -r 36694cae3927 -r 72e70f9041c2 extras/mini-os/hypervisor.c --- a/extras/mini-os/hypervisor.c Thu May 08 11:20:04 2008 +0100 +++ b/extras/mini-os/hypervisor.c Thu May 08 11:27:22 2008 +0100 @@ -58,7 +58,7 @@ void do_hypervisor_callback(struct pt_re l2i = __ffs(l2); l2 &= ~(1 << l2i); - port = (l1i << 5) + l2i; + port = (l1i * (sizeof(unsigned long) * 8)) + l2i; do_event(port, regs); } } @@ -100,7 +100,8 @@ inline void unmask_evtchn(u32 port) * a real IO-APIC we 'lose the interrupt edge' if the channel is masked. */ if ( synch_test_bit (port, &s->evtchn_pending[0]) && - !synch_test_and_set_bit(port>>5, &vcpu_info->evtchn_pending_sel) ) + !synch_test_and_set_bit(port / (sizeof(unsigned long) * 8), + &vcpu_info->evtchn_pending_sel) ) { vcpu_info->evtchn_upcall_pending = 1; if ( !vcpu_info->evtchn_upcall_mask ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |