aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2011-02-14 18:34:57 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2011-02-18 00:02:43 -0500
commit4822b7fc6d4870685a9feadfc348d48f5e47460a (patch)
tree52a482fde76ff8bae64fc09761967a33b9b7b08b /arch/x86/kernel/smpboot.c
parent85e2efbb1db9a18d218006706d6e4fbeb0216213 (diff)
x86, trampoline: Common infrastructure for low memory trampolines
Common infrastructure for low memory trampolines. This code installs the trampolines permanently in low memory very early. It also permits multiple pieces of code to be used for this purpose. This code also introduces a standard infrastructure for computing symbol addresses in the trampoline code. The only change to the actual SMP trampolines themselves is that the 64-bit trampoline has been made reusable -- the previous version would overwrite the code with a status variable; this moves the status variable to a separate location. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> LKML-Reference: <4D5DFBE4.7090104@intel.com> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Matthieu Castet <castet.matthieu@free.fr> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 08776a953487..545273369efa 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -788,7 +788,7 @@ do_rest:
788 stack_start = c_idle.idle->thread.sp; 788 stack_start = c_idle.idle->thread.sp;
789 789
790 /* start_ip had better be page-aligned! */ 790 /* start_ip had better be page-aligned! */
791 start_ip = setup_trampoline(); 791 start_ip = trampoline_address();
792 792
793 /* So we see what's up */ 793 /* So we see what's up */
794 announce_cpu(cpu, apicid); 794 announce_cpu(cpu, apicid);
@@ -798,6 +798,8 @@ do_rest:
798 * the targeted processor. 798 * the targeted processor.
799 */ 799 */
800 800
801 printk(KERN_DEBUG "smpboot cpu %d: start_ip = %lx\n", cpu, start_ip);
802
801 atomic_set(&init_deasserted, 0); 803 atomic_set(&init_deasserted, 0);
802 804
803 if (get_uv_system_type() != UV_NON_UNIQUE_APIC) { 805 if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
@@ -851,8 +853,8 @@ do_rest:
851 pr_debug("CPU%d: has booted.\n", cpu); 853 pr_debug("CPU%d: has booted.\n", cpu);
852 else { 854 else {
853 boot_error = 1; 855 boot_error = 1;
854 if (*((volatile unsigned char *)trampoline_base) 856 if (*(volatile u32 *)TRAMPOLINE_SYM(trampoline_status)
855 == 0xA5) 857 == 0xA5A5A5A5)
856 /* trampoline started but...? */ 858 /* trampoline started but...? */
857 pr_err("CPU%d: Stuck ??\n", cpu); 859 pr_err("CPU%d: Stuck ??\n", cpu);
858 else 860 else
@@ -878,7 +880,7 @@ do_rest:
878 } 880 }
879 881
880 /* mark "stuck" area as not stuck */ 882 /* mark "stuck" area as not stuck */
881 *((volatile unsigned long *)trampoline_base) = 0; 883 *(volatile u32 *)TRAMPOLINE_SYM(trampoline_status) = 0;
882 884
883 if (get_uv_system_type() != UV_NON_UNIQUE_APIC) { 885 if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
884 /* 886 /*