Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[cascardo/linux.git] / arch / x86 / kernel / smpboot.c
index 433529e..fd019d7 100644 (file)
@@ -57,7 +57,7 @@
 #include <asm/nmi.h>
 #include <asm/irq.h>
 #include <asm/idle.h>
-#include <asm/trampoline.h>
+#include <asm/realmode.h>
 #include <asm/cpu.h>
 #include <asm/numa.h>
 #include <asm/pgtable.h>
@@ -73,6 +73,8 @@
 #include <asm/smpboot_hooks.h>
 #include <asm/i8259.h>
 
+#include <asm/realmode.h>
+
 /* State of each CPU */
 DEFINE_PER_CPU(int, cpu_state) = { 0 };
 
@@ -408,15 +410,7 @@ void __cpuinit set_cpu_sibling_map(int cpu)
 /* maps the cpu to the sched domain representing multi-core */
 const struct cpumask *cpu_coregroup_mask(int cpu)
 {
-       struct cpuinfo_x86 *c = &cpu_data(cpu);
-       /*
-        * For perf, we return last level cache shared map.
-        * And for power savings, we return cpu_core_map
-        */
-       if (!(cpu_has(c, X86_FEATURE_AMD_DCM)))
-               return cpu_core_mask(cpu);
-       else
-               return cpu_llc_shared_mask(cpu);
+       return cpu_llc_shared_mask(cpu);
 }
 
 static void impress_friends(void)
@@ -660,8 +654,12 @@ static void __cpuinit announce_cpu(int cpu, int apicid)
  */
 static int __cpuinit do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
 {
+       volatile u32 *trampoline_status =
+               (volatile u32 *) __va(real_mode_header->trampoline_status);
+       /* start_ip had better be page-aligned! */
+       unsigned long start_ip = real_mode_header->trampoline_start;
+
        unsigned long boot_error = 0;
-       unsigned long start_ip;
        int timeout;
 
        alternatives_smp_switch(1);
@@ -684,9 +682,6 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
        initial_code = (unsigned long)start_secondary;
        stack_start  = idle->thread.sp;
 
-       /* start_ip had better be page-aligned! */
-       start_ip = trampoline_address();
-
        /* So we see what's up */
        announce_cpu(cpu, apicid);
 
@@ -749,8 +744,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
                        pr_debug("CPU%d: has booted.\n", cpu);
                } else {
                        boot_error = 1;
-                       if (*(volatile u32 *)TRAMPOLINE_SYM(trampoline_status)
-                           == 0xA5A5A5A5)
+                       if (*trampoline_status == 0xA5A5A5A5)
                                /* trampoline started but...? */
                                pr_err("CPU%d: Stuck ??\n", cpu);
                        else
@@ -776,7 +770,7 @@ static int __cpuinit do_boot_cpu(int apicid, int cpu, struct task_struct *idle)
        }
 
        /* mark "stuck" area as not stuck */
-       *(volatile u32 *)TRAMPOLINE_SYM(trampoline_status) = 0;
+       *trampoline_status = 0;
 
        if (get_uv_system_type() != UV_NON_UNIQUE_APIC) {
                /*