diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-03-03 12:13:12 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:40:57 -0400 |
commit | 91718e8d13c23bfe0aa6fa6b730c5c33ee9771bf (patch) | |
tree | 6ed8d645bfdc0bdcf6b93e3ac9b618f879b3bf8b /include/asm-x86 | |
parent | da522b07293756b9cb4e2c570454f95b8e79e189 (diff) |
x86: unify setup_trampoline
setup_trampoline() looks very similar between architectures, and this
patch unifies them. The i386 version allocates bootmem memory, while
the x86_64 version uses a fixed address.
In this patch, we initialize the global trampoline_base to the x86_64 version,
and i386 allocation can later override it.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/smp.h | 4 | ||||
-rw-r--r-- | include/asm-x86/smp_64.h | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h index b2a1697e4700..513c8571a4a0 100644 --- a/include/asm-x86/smp.h +++ b/include/asm-x86/smp.h | |||
@@ -14,6 +14,7 @@ extern unsigned int num_processors; | |||
14 | */ | 14 | */ |
15 | extern const unsigned char trampoline_data []; | 15 | extern const unsigned char trampoline_data []; |
16 | extern const unsigned char trampoline_end []; | 16 | extern const unsigned char trampoline_end []; |
17 | extern unsigned char *trampoline_base; | ||
17 | 18 | ||
18 | struct smp_ops { | 19 | struct smp_ops { |
19 | void (*smp_prepare_boot_cpu)(void); | 20 | void (*smp_prepare_boot_cpu)(void); |
@@ -81,6 +82,9 @@ extern void __cpu_die(unsigned int cpu); | |||
81 | 82 | ||
82 | extern unsigned disabled_cpus; | 83 | extern unsigned disabled_cpus; |
83 | extern void prefill_possible_map(void); | 84 | extern void prefill_possible_map(void); |
85 | |||
86 | #define SMP_TRAMPOLINE_BASE 0x6000 | ||
87 | extern unsigned long setup_trampoline(void); | ||
84 | #endif | 88 | #endif |
85 | 89 | ||
86 | #ifdef CONFIG_X86_32 | 90 | #ifdef CONFIG_X86_32 |
diff --git a/include/asm-x86/smp_64.h b/include/asm-x86/smp_64.h index d554d7d57327..394c78524331 100644 --- a/include/asm-x86/smp_64.h +++ b/include/asm-x86/smp_64.h | |||
@@ -40,8 +40,6 @@ static inline int cpu_present_to_apicid(int mps_cpu) | |||
40 | 40 | ||
41 | #ifdef CONFIG_SMP | 41 | #ifdef CONFIG_SMP |
42 | 42 | ||
43 | #define SMP_TRAMPOLINE_BASE 0x6000 | ||
44 | |||
45 | #define raw_smp_processor_id() read_pda(cpunumber) | 43 | #define raw_smp_processor_id() read_pda(cpunumber) |
46 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) | 44 | #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu) |
47 | 45 | ||