aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2010-05-12 17:19:01 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-05-12 17:20:33 -0400
commita9aa1d02de36b450990b0e25a88fc2ff1c3e6b94 (patch)
tree1f9d19f1642d263e65906a916a48be9339accc73 /kernel/cpu.c
parent5671a10e2bc7f99d9157c6044faf8be2ef302361 (diff)
parentb57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff)
Merge commit 'v2.6.34-rc7' into perf/nmi
Merge reason: catch up with latest softlockup detector changes.
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 1c8ddd6ee940..25bba73b1be3 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -14,6 +14,7 @@
14#include <linux/kthread.h> 14#include <linux/kthread.h>
15#include <linux/stop_machine.h> 15#include <linux/stop_machine.h>
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <linux/gfp.h>
17 18
18#ifdef CONFIG_SMP 19#ifdef CONFIG_SMP
19/* Serializes the updates to cpu_online_mask, cpu_present_mask */ 20/* Serializes the updates to cpu_online_mask, cpu_present_mask */
@@ -151,13 +152,13 @@ static inline void check_for_tasks(int cpu)
151 152
152 write_lock_irq(&tasklist_lock); 153 write_lock_irq(&tasklist_lock);
153 for_each_process(p) { 154 for_each_process(p) {
154 if (task_cpu(p) == cpu && 155 if (task_cpu(p) == cpu && p->state == TASK_RUNNING &&
155 (!cputime_eq(p->utime, cputime_zero) || 156 (!cputime_eq(p->utime, cputime_zero) ||
156 !cputime_eq(p->stime, cputime_zero))) 157 !cputime_eq(p->stime, cputime_zero)))
157 printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d\ 158 printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d "
158 (state = %ld, flags = %x) \n", 159 "(state = %ld, flags = %x)\n",
159 p->comm, task_pid_nr(p), cpu, 160 p->comm, task_pid_nr(p), cpu,
160 p->state, p->flags); 161 p->state, p->flags);
161 } 162 }
162 write_unlock_irq(&tasklist_lock); 163 write_unlock_irq(&tasklist_lock);
163} 164}
@@ -338,7 +339,7 @@ int __cpuinit cpu_up(unsigned int cpu)
338 if (!cpu_possible(cpu)) { 339 if (!cpu_possible(cpu)) {
339 printk(KERN_ERR "can't online cpu %d because it is not " 340 printk(KERN_ERR "can't online cpu %d because it is not "
340 "configured as may-hotadd at boot time\n", cpu); 341 "configured as may-hotadd at boot time\n", cpu);
341#if defined(CONFIG_IA64) || defined(CONFIG_X86_64) 342#if defined(CONFIG_IA64)
342 printk(KERN_ERR "please check additional_cpus= boot " 343 printk(KERN_ERR "please check additional_cpus= boot "
343 "parameter\n"); 344 "parameter\n");
344#endif 345#endif