ia64/xen-unstable

changeset 14260:2963f61b8135

linux: Prefer testing io_bitmap_ptr to the TIF_IO_BITMAP.
Former is safer (in case TIF_IO_BITMAP is out-of-sync with actual
existence of an I/O bitmap for this process) and more readable, and
probably results in faster code too.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Mon Mar 05 14:20:26 2007 +0000 (2007-03-05)
parents 4159a8a43a97
children 7a39b1e22373
files linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c	Mon Mar 05 14:09:19 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c	Mon Mar 05 14:20:26 2007 +0000
     1.3 @@ -605,8 +605,7 @@ struct task_struct fastcall * __switch_t
     1.4  		mcl++;
     1.5  	}
     1.6  
     1.7 -	if (unlikely(test_tsk_thread_flag(prev_p, TIF_IO_BITMAP)
     1.8 -	             || test_tsk_thread_flag(next_p, TIF_IO_BITMAP))) {
     1.9 +	if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) {
    1.10  		iobmp_op.bitmap   = (char *)next->io_bitmap_ptr;
    1.11  		iobmp_op.nr_ports = next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
    1.12  		mcl->op      = __HYPERVISOR_physdev_op;