]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
sh: Use generic idle thread allocation
authorThomas Gleixner <tglx@linutronix.de>
Fri, 20 Apr 2012 13:05:54 +0000 (13:05 +0000)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 26 Apr 2012 10:06:12 +0000 (12:06 +0200)
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Link: http://lkml.kernel.org/r/20120420124557.855203626@linutronix.de
arch/sh/Kconfig
arch/sh/include/asm/processor.h
arch/sh/kernel/smp.c

index ff9e033ce626774fe5b0ad7ddf1c199fe7789471..244cfd0dbb7b685b63f821e8acaa528c0e7af60d 100644 (file)
@@ -28,6 +28,7 @@ config SUPERH
        select RTC_LIB
        select GENERIC_ATOMIC64
        select GENERIC_IRQ_SHOW
+       select GENERIC_SMP_IDLE_THREAD
        help
          The SuperH is a RISC processor targeted for use in embedded systems
          and consumer electronics; it was also used in the Sega Dreamcast
index a229c393826ac116e64e48597ac011510ffc4102..6d87912415a7332a81e476962f430d0299ef24e9 100644 (file)
@@ -85,10 +85,6 @@ struct sh_cpuinfo {
        struct tlb_info itlb;
        struct tlb_info dtlb;
 
-#ifdef CONFIG_SMP
-       struct task_struct *idle;
-#endif
-
        unsigned int phys_bits;
        unsigned long flags;
 } __attribute__ ((aligned(L1_CACHE_BYTES)));
index ebb76e2a748ba4a74198c1231b9ad425da550913..b86e9ca79455d7cacb08a21b2e2199bc8879ee7c 100644 (file)
@@ -220,22 +220,10 @@ extern struct {
        void *thread_info;
 } stack_start;
 
-int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle)
+int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tsk)
 {
-       struct task_struct *tsk;
        unsigned long timeout;
 
-       tsk = cpu_data[cpu].idle;
-       if (!tsk) {
-               tsk = fork_idle(cpu);
-               if (IS_ERR(tsk)) {
-                       pr_err("Failed forking idle task for cpu %d\n", cpu);
-                       return PTR_ERR(tsk);
-               }
-
-               cpu_data[cpu].idle = tsk;
-       }
-
        per_cpu(cpu_state, cpu) = CPU_UP_PREPARE;
 
        /* Fill in data in head.S for secondary cpus */