]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/kernel/smp.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-omap-h63xx.git] / arch / arm / kernel / smp.c
index e55ea952f7aa1d9f84ecce020d5caaa548f244fd..68e9634d260a74c8a1d21d93db7a2421fa376859 100644 (file)
@@ -7,7 +7,6 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-#include <linux/config.h>
 #include <linux/delay.h>
 #include <linux/init.h>
 #include <linux/spinlock.h>
@@ -114,7 +113,7 @@ int __cpuinit __cpu_up(unsigned int cpu)
         * We need to tell the secondary core where to find
         * its stack and the page tables.
         */
-       secondary_data.stack = (void *)idle->thread_info + THREAD_START_SP;
+       secondary_data.stack = task_stack_page(idle) + THREAD_START_SP;
        secondary_data.pgdir = virt_to_phys(pgd);
        wmb();
 
@@ -245,7 +244,7 @@ void __cpuexit cpu_die(void)
        __asm__("mov    sp, %0\n"
        "       b       secondary_start_kernel"
                :
-               : "r" ((void *)current->thread_info + THREAD_SIZE - 8));
+               : "r" (task_stack_page(current) + THREAD_SIZE - 8));
 }
 #endif /* CONFIG_HOTPLUG_CPU */
 
@@ -256,9 +255,7 @@ void __cpuexit cpu_die(void)
 asmlinkage void __cpuinit secondary_start_kernel(void)
 {
        struct mm_struct *mm = &init_mm;
-       unsigned int cpu;
-
-       cpu = smp_processor_id();
+       unsigned int cpu = smp_processor_id();
 
        printk("CPU%u: Booted secondary processor\n", cpu);
 
@@ -339,10 +336,6 @@ void __init smp_prepare_boot_cpu(void)
        unsigned int cpu = smp_processor_id();
 
        per_cpu(cpu_data, cpu).idle = current;
-
-       cpu_set(cpu, cpu_possible_map);
-       cpu_set(cpu, cpu_present_map);
-       cpu_set(cpu, cpu_online_map);
 }
 
 static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)