diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-04-20 09:05:53 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2012-04-26 06:06:11 -0400 |
commit | a4cfc31da34eacafd9f6b16e149448bf0ef6d0b2 (patch) | |
tree | 29bf19eabf92361a71a1bf8fdebdfb0f3f4fbcf2 /arch/cris | |
parent | e80e7813cd772cf30597024b371e73df9736de8d (diff) |
cris: Use generic idle thread allocation
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: Jesper Nilsson <jesper.nilsson@axis.com>
Link: http://lkml.kernel.org/r/20120420124557.789657793@linutronix.de
Diffstat (limited to 'arch/cris')
-rw-r--r-- | arch/cris/Kconfig | 1 | ||||
-rw-r--r-- | arch/cris/arch-v32/kernel/smp.c | 12 |
2 files changed, 3 insertions, 10 deletions
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index b3abfb08aa5c..2995035812ec 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -49,6 +49,7 @@ config CRIS | |||
49 | select HAVE_GENERIC_HARDIRQS | 49 | select HAVE_GENERIC_HARDIRQS |
50 | select GENERIC_IRQ_SHOW | 50 | select GENERIC_IRQ_SHOW |
51 | select GENERIC_IOMAP | 51 | select GENERIC_IOMAP |
52 | select GENERIC_SMP_IDLE_THREAD if ETRAX_ARCH_V32 | ||
52 | 53 | ||
53 | config HZ | 54 | config HZ |
54 | int | 55 | int |
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c index 125ee2d7bc87..ebe2cb30bd11 100644 --- a/arch/cris/arch-v32/kernel/smp.c +++ b/arch/cris/arch-v32/kernel/smp.c | |||
@@ -108,17 +108,12 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
108 | 108 | ||
109 | /* Bring one cpu online.*/ | 109 | /* Bring one cpu online.*/ |
110 | static int __init | 110 | static int __init |
111 | smp_boot_one_cpu(int cpuid) | 111 | smp_boot_one_cpu(int cpuid, struct task_struct idle) |
112 | { | 112 | { |
113 | unsigned timeout; | 113 | unsigned timeout; |
114 | struct task_struct *idle; | ||
115 | cpumask_t cpu_mask; | 114 | cpumask_t cpu_mask; |
116 | 115 | ||
117 | cpumask_clear(&cpu_mask); | 116 | cpumask_clear(&cpu_mask); |
118 | idle = fork_idle(cpuid); | ||
119 | if (IS_ERR(idle)) | ||
120 | panic("SMP: fork failed for CPU:%d", cpuid); | ||
121 | |||
122 | task_thread_info(idle)->cpu = cpuid; | 117 | task_thread_info(idle)->cpu = cpuid; |
123 | 118 | ||
124 | /* Information to the CPU that is about to boot */ | 119 | /* Information to the CPU that is about to boot */ |
@@ -142,9 +137,6 @@ smp_boot_one_cpu(int cpuid) | |||
142 | barrier(); | 137 | barrier(); |
143 | } | 138 | } |
144 | 139 | ||
145 | put_task_struct(idle); | ||
146 | idle = NULL; | ||
147 | |||
148 | printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); | 140 | printk(KERN_CRIT "SMP: CPU:%d is stuck.\n", cpuid); |
149 | return -1; | 141 | return -1; |
150 | } | 142 | } |
@@ -209,7 +201,7 @@ unsigned long cache_decay_ticks = 1; | |||
209 | 201 | ||
210 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) | 202 | int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) |
211 | { | 203 | { |
212 | smp_boot_one_cpu(cpu); | 204 | smp_boot_one_cpu(cpu, tidle); |
213 | return cpu_online(cpu) ? 0 : -ENOSYS; | 205 | return cpu_online(cpu) ? 0 : -ENOSYS; |
214 | } | 206 | } |
215 | 207 | ||