Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191642
b: refs/heads/master
c: 8db2bc4
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Apr 26, 2010
1 parent 182b1fc commit 4edc59e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1cfa1e8f2c824b131612c9a70b48433998237331
refs/heads/master: 8db2bc4559639680a94d4492ae4b7ce71298a74f
4 changes: 4 additions & 0 deletions trunk/arch/sh/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ struct sh_cpuinfo {
struct tlb_info itlb;
struct tlb_info dtlb;

#ifdef CONFIG_SMP
struct task_struct *idle;
#endif

unsigned long flags;
} __attribute__ ((aligned(L1_CACHE_BYTES)));

Expand Down
13 changes: 9 additions & 4 deletions trunk/arch/sh/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,15 @@ int __cpuinit __cpu_up(unsigned int cpu)
struct task_struct *tsk;
unsigned long timeout;

tsk = fork_idle(cpu);
if (IS_ERR(tsk)) {
printk(KERN_ERR "Failed forking idle task for cpu %d\n", cpu);
return PTR_ERR(tsk);
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;
Expand Down

0 comments on commit 4edc59e

Please sign in to comment.