x86: merge 64 and 32 SMP percpu handling
authorTejun Heo <tj@kernel.org>
Tue, 13 Jan 2009 11:41:35 +0000 (20:41 +0900)
committerIngo Molnar <mingo@elte.hu>
Fri, 16 Jan 2009 13:19:58 +0000 (14:19 +0100)
commit9939ddaff52787b2a7c1adf1b2afc95421aa0884
tree6e7266d065914e19c3c3f4b4e475f09b9669fa51
parent1a51e3a0aed18767cf2762e95456ecfeb0bca5e6
x86: merge 64 and 32 SMP percpu handling

Now that pda is allocated as part of percpu, percpu doesn't need to be
accessed through pda.  Unify x86_64 SMP percpu access with x86_32 SMP
one.  Other than the segment register, operand size and the base of
percpu symbols, they behave identical now.

This patch replaces now unnecessary pda->data_offset with a dummy
field which is necessary to keep stack_canary at its place.  This
patch also moves per_cpu_offset initialization out of init_gdt() into
setup_per_cpu_areas().  Note that this change also necessitates
explicit per_cpu_offset initializations in voyager_smp.c.

With this change, x86_OP_percpu()'s are as efficient on x86_64 as on
x86_32 and also x86_64 can use assembly PER_CPU macros.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/include/asm/pda.h
arch/x86/include/asm/percpu.h
arch/x86/kernel/asm-offsets_64.c
arch/x86/kernel/entry_64.S
arch/x86/kernel/head64.c
arch/x86/kernel/setup_percpu.c
arch/x86/kernel/smpcommon.c
arch/x86/mach-voyager/voyager_smp.c