Skip to content

Commit

Permalink
sh: Use generic idle thread allocation
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thomas Gleixner committed Apr 26, 2012
1 parent 6bba268 commit ea0588c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
1 change: 1 addition & 0 deletions arch/sh/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions arch/sh/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down
14 changes: 1 addition & 13 deletions arch/sh/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ea0588c

Please sign in to comment.