Index: linux-2.6/include/asm-x86/percpu.h =================================================================== --- linux-2.6.orig/include/asm-x86/percpu.h 2008-05-23 23:47:44.000000000 -0700 +++ linux-2.6/include/asm-x86/percpu.h 2008-05-23 23:47:52.000000000 -0700 @@ -6,10 +6,12 @@ #include #ifdef CONFIG_SMP -#define __my_cpu_offset read_pda(data_offset) -#endif - +#define __my_cpu_offset x86_read_percpu(pda.data_offset) #define __percpu_seg "%%gs:" +#else +#define __percpu_seg "" + +#endif #include @@ -44,30 +46,12 @@ #else /* ...!ASSEMBLY */ -/* - * PER_CPU finds an address of a per-cpu variable. - * - * Args: - * var - variable name - * cpu - 32bit register containing the current CPU number - * - * The resulting address is stored in the "cpu" argument. - * - * Example: - * PER_CPU(cpu_gdt_descr, %ebx) - */ #ifdef CONFIG_SMP - #define __my_cpu_offset x86_read_percpu(this_cpu_off) - -/* fs segment starts at (positive) offset == __per_cpu_offset[cpu] */ #define __percpu_seg "%%fs:" - -#else /* !SMP */ - +#else #define __percpu_seg "" - -#endif /* SMP */ +#endif/ #include