diff options
author | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-07-03 18:13:18 -0400 |
commit | c43768cbb7655ea5ff782ae250f6e2ef4297cf98 (patch) | |
tree | 3982e41dde3eecaa3739a5d1a8ed18d04bd74f01 /arch/mips/kernel/process.c | |
parent | 1a8dd307cc0a2119be4e578c517795464e6dabba (diff) | |
parent | 746a99a5af60ee676afa2ba469ccd1373493c7e7 (diff) |
Merge branch 'master' into for-next
Pull linus#master to merge PER_CPU_DEF_ATTRIBUTES and alpha build fix
changes. As alpha in percpu tree uses 'weak' attribute instead of
inline assembly, there's no need for __used attribute.
Conflicts:
arch/alpha/include/asm/percpu.h
arch/mn10300/kernel/vmlinux.lds.S
include/linux/percpu-defs.h
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 1eaaa450e20c..c09d681b7181 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -50,10 +50,15 @@ | |||
50 | */ | 50 | */ |
51 | void __noreturn cpu_idle(void) | 51 | void __noreturn cpu_idle(void) |
52 | { | 52 | { |
53 | int cpu; | ||
54 | |||
55 | /* CPU is going idle. */ | ||
56 | cpu = smp_processor_id(); | ||
57 | |||
53 | /* endless idle loop with no priority at all */ | 58 | /* endless idle loop with no priority at all */ |
54 | while (1) { | 59 | while (1) { |
55 | tick_nohz_stop_sched_tick(1); | 60 | tick_nohz_stop_sched_tick(1); |
56 | while (!need_resched()) { | 61 | while (!need_resched() && cpu_online(cpu)) { |
57 | #ifdef CONFIG_MIPS_MT_SMTC | 62 | #ifdef CONFIG_MIPS_MT_SMTC |
58 | extern void smtc_idle_loop_hook(void); | 63 | extern void smtc_idle_loop_hook(void); |
59 | 64 | ||
@@ -62,6 +67,12 @@ void __noreturn cpu_idle(void) | |||
62 | if (cpu_wait) | 67 | if (cpu_wait) |
63 | (*cpu_wait)(); | 68 | (*cpu_wait)(); |
64 | } | 69 | } |
70 | #ifdef CONFIG_HOTPLUG_CPU | ||
71 | if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map) && | ||
72 | (system_state == SYSTEM_RUNNING || | ||
73 | system_state == SYSTEM_BOOTING)) | ||
74 | play_dead(); | ||
75 | #endif | ||
65 | tick_nohz_restart_sched_tick(); | 76 | tick_nohz_restart_sched_tick(); |
66 | preempt_enable_no_resched(); | 77 | preempt_enable_no_resched(); |
67 | schedule(); | 78 | schedule(); |