aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mach-voyager/voyager_smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mach-voyager/voyager_smp.c')
-rw-r--r--arch/x86/mach-voyager/voyager_smp.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/mach-voyager/voyager_smp.c b/arch/x86/mach-voyager/voyager_smp.c
index 3cc8eb2f36a9..be7235bf105d 100644
--- a/arch/x86/mach-voyager/voyager_smp.c
+++ b/arch/x86/mach-voyager/voyager_smp.c
@@ -27,6 +27,7 @@
27#include <asm/pgalloc.h> 27#include <asm/pgalloc.h>
28#include <asm/tlbflush.h> 28#include <asm/tlbflush.h>
29#include <asm/arch_hooks.h> 29#include <asm/arch_hooks.h>
30#include <asm/trampoline.h>
30 31
31/* TLB state -- visible externally, indexed physically */ 32/* TLB state -- visible externally, indexed physically */
32DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = { &init_mm, 0 }; 33DEFINE_PER_CPU_SHARED_ALIGNED(struct tlb_state, cpu_tlbstate) = { &init_mm, 0 };
@@ -210,7 +211,7 @@ static int cpucount = 0;
210/* steal a page from the bottom of memory for the trampoline and 211/* steal a page from the bottom of memory for the trampoline and
211 * squirrel its address away here. This will be in kernel virtual 212 * squirrel its address away here. This will be in kernel virtual
212 * space */ 213 * space */
213static __u32 trampoline_base; 214unsigned char *trampoline_base;
214 215
215/* The per cpu profile stuff - used in smp_local_timer_interrupt */ 216/* The per cpu profile stuff - used in smp_local_timer_interrupt */
216static DEFINE_PER_CPU(int, prof_multiplier) = 1; 217static DEFINE_PER_CPU(int, prof_multiplier) = 1;
@@ -429,15 +430,15 @@ void __init smp_store_cpu_info(int id)
429} 430}
430 431
431/* set up the trampoline and return the physical address of the code */ 432/* set up the trampoline and return the physical address of the code */
432static __u32 __init setup_trampoline(void) 433unsigned long __init setup_trampoline(void)
433{ 434{
434 /* these two are global symbols in trampoline.S */ 435 /* these two are global symbols in trampoline.S */
435 extern const __u8 trampoline_end[]; 436 extern const __u8 trampoline_end[];
436 extern const __u8 trampoline_data[]; 437 extern const __u8 trampoline_data[];
437 438
438 memcpy((__u8 *) trampoline_base, trampoline_data, 439 memcpy(trampoline_base, trampoline_data,
439 trampoline_end - trampoline_data); 440 trampoline_end - trampoline_data);
440 return virt_to_phys((__u8 *) trampoline_base); 441 return virt_to_phys(trampoline_base);
441} 442}
442 443
443/* Routine initially called when a non-boot CPU is brought online */ 444/* Routine initially called when a non-boot CPU is brought online */
@@ -520,13 +521,6 @@ static void __init do_boot_cpu(__u8 cpu)
520 & ~(voyager_extended_vic_processors 521 & ~(voyager_extended_vic_processors
521 & voyager_allowed_boot_processors); 522 & voyager_allowed_boot_processors);
522 523
523 /* This is an area in head.S which was used to set up the
524 * initial kernel stack. We need to alter this to give the
525 * booting CPU a new stack (taken from its idle process) */
526 extern struct {
527 __u8 *sp;
528 unsigned short ss;
529 } stack_start;
530 /* This is the format of the CPI IDT gate (in real mode) which 524 /* This is the format of the CPI IDT gate (in real mode) which
531 * we're hijacking to boot the CPU */ 525 * we're hijacking to boot the CPU */
532 union IDTFormat { 526 union IDTFormat {
@@ -1166,7 +1160,7 @@ void flush_tlb_all(void)
1166 * is sorted out */ 1160 * is sorted out */
1167void __init smp_alloc_memory(void) 1161void __init smp_alloc_memory(void)
1168{ 1162{
1169 trampoline_base = (__u32) alloc_bootmem_low_pages(PAGE_SIZE); 1163 trampoline_base = alloc_bootmem_low_pages(PAGE_SIZE);
1170 if (__pa(trampoline_base) >= 0x93000) 1164 if (__pa(trampoline_base) >= 0x93000)
1171 BUG(); 1165 BUG();
1172} 1166}