On Wed, 10 Aug 2005 zach@xxxxxxxxxx wrote: > Add an accessor function for getting the per-CPU gdt. Callee must already > have the CPU. This one seems superfluous to me, does accessing it indirectly generate better code too? > Patch-base: 2.6.13-rc5-mm1 > Patch-keys: i386 desc xen > Signed-off-by: Zachary Amsden <zach@xxxxxxxxxx> > Index: linux-2.6.13/include/asm-i386/desc.h > =================================================================== > --- linux-2.6.13.orig/include/asm-i386/desc.h 2005-08-09 20:17:21.000000000 -0700 > +++ linux-2.6.13/include/asm-i386/desc.h 2005-08-10 20:41:03.000000000 -0700 > @@ -39,6 +39,8 @@ > extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; > DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); > > +#define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table, _cpu)) > + > DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]);