aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/softlockup.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2005-11-07 03:58:38 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:53:29 -0500
commita4c4af7c8dc1eccdfb8c57e1684f08179b4407e6 (patch)
tree210773f292da3ba85818402f1945ee7b14ba8c71 /kernel/softlockup.c
parentcc658cfe3c66a6124b5a8db90cdcdd440201b1dc (diff)
[PATCH] cpu hoptlug: avoid usage of smp_processor_id() in preemptible code
Replace smp_processor_id() with any_online_cpu(cpu_online_map) in order to avoid lots of "BUG: using smp_processor_id() in preemptible [00000001] code:..." messages in case taking a cpu online fails. All the traces start at the last notifier_call_chain(...) in kernel/cpu.c. Since we hold the cpu_control semaphore it shouldn't be any problem to access cpu_online_map. The reason why cpu_up failed is simply that the cpu that was supposed to be taken online wasn't even there. That is because on s390 we never know when a new cpu comes and therefore cpu_possible_map consists of only ones and doesn't reflect reality. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/softlockup.c')
-rw-r--r--kernel/softlockup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/softlockup.c b/kernel/softlockup.c
index 75976209cea7..a2dcceb9437d 100644
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -123,7 +123,8 @@ cpu_callback(struct notifier_block *nfb, unsigned long action, void *hcpu)
123#ifdef CONFIG_HOTPLUG_CPU 123#ifdef CONFIG_HOTPLUG_CPU
124 case CPU_UP_CANCELED: 124 case CPU_UP_CANCELED:
125 /* Unbind so it can run. Fall thru. */ 125 /* Unbind so it can run. Fall thru. */
126 kthread_bind(per_cpu(watchdog_task, hotcpu), smp_processor_id()); 126 kthread_bind(per_cpu(watchdog_task, hotcpu),
127 any_online_cpu(cpu_online_map));
127 case CPU_DEAD: 128 case CPU_DEAD:
128 p = per_cpu(watchdog_task, hotcpu); 129 p = per_cpu(watchdog_task, hotcpu);
129 per_cpu(watchdog_task, hotcpu) = NULL; 130 per_cpu(watchdog_task, hotcpu) = NULL;