ia64/xen-unstable

changeset 2381:b078dc2c118f

bitkeeper revision 1.1159.63.1 (412f7bbf5smbnLknRPslkbedgaBzzw)

Only update the tls descriptors if they are changed.
author cl349@freefall.cl.cam.ac.uk
date Fri Aug 27 18:21:51 2004 +0000 (2004-08-27)
parents 6090073bceb8
children dfc8f11d8526
files linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/process.c
line diff
     1.1 --- a/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/process.c	Fri Aug 27 15:57:33 2004 +0000
     1.2 +++ b/linux-2.6.8.1-xen-sparse/arch/xen/i386/kernel/process.c	Fri Aug 27 18:21:51 2004 +0000
     1.3 @@ -556,7 +556,15 @@ struct task_struct fastcall * __switch_t
     1.4  	 * Load the per-thread Thread-Local Storage descriptor.
     1.5  	 * This is load_TLS(next, cpu) with multicalls.
     1.6  	 */
     1.7 -#define C(i) queue_multicall3(__HYPERVISOR_update_descriptor, virt_to_machine(&get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i]), ((u32 *)&next->tls_array[i])[0], ((u32 *)&next->tls_array[i])[1])
     1.8 +#define C(i) do {							    \
     1.9 +	if (unlikely(next->tls_array[i].a != prev->tls_array[i].a ||	    \
    1.10 +		     next->tls_array[i].b != prev->tls_array[i].b))	    \
    1.11 +		queue_multicall3(__HYPERVISOR_update_descriptor,	    \
    1.12 +				 virt_to_machine(&get_cpu_gdt_table(cpu)    \
    1.13 +						 [GDT_ENTRY_TLS_MIN + i]),  \
    1.14 +				 ((u32 *)&next->tls_array[i])[0],	    \
    1.15 +				 ((u32 *)&next->tls_array[i])[1]);	    \
    1.16 +} while (0)
    1.17  	C(0); C(1); C(2);
    1.18  #undef C
    1.19