diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-04 19:11:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-04 19:54:14 -0400 |
commit | 84117da5b79ffb4077bb05d64c86dfa4d746115c (patch) | |
tree | 2d5ec9f4f27fe506d9e2a14b049118ec590081f7 | |
parent | 2c0d259e0e580dd95dd5d2d5aa4926169228d4a0 (diff) |
kernel/cpu.c: convert printk to pr_foo()
no level printk converted to pr_warn (if err)
no level printk converted to pr_info (disabling non-boot cpus)
Other printk converted to respective level.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/cpu.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index 247979a1b815..acf791c55b71 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c | |||
@@ -283,8 +283,7 @@ static inline void check_for_tasks(int cpu) | |||
283 | task_cputime(p, &utime, &stime); | 283 | task_cputime(p, &utime, &stime); |
284 | if (task_cpu(p) == cpu && p->state == TASK_RUNNING && | 284 | if (task_cpu(p) == cpu && p->state == TASK_RUNNING && |
285 | (utime || stime)) | 285 | (utime || stime)) |
286 | printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d " | 286 | pr_warn("Task %s (pid = %d) is on cpu %d (state = %ld, flags = %x)\n", |
287 | "(state = %ld, flags = %x)\n", | ||
288 | p->comm, task_pid_nr(p), cpu, | 287 | p->comm, task_pid_nr(p), cpu, |
289 | p->state, p->flags); | 288 | p->state, p->flags); |
290 | } | 289 | } |
@@ -336,8 +335,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) | |||
336 | if (err) { | 335 | if (err) { |
337 | nr_calls--; | 336 | nr_calls--; |
338 | __cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL); | 337 | __cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL); |
339 | printk("%s: attempt to take down CPU %u failed\n", | 338 | pr_warn("%s: attempt to take down CPU %u failed\n", |
340 | __func__, cpu); | 339 | __func__, cpu); |
341 | goto out_release; | 340 | goto out_release; |
342 | } | 341 | } |
343 | 342 | ||
@@ -444,8 +443,8 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen) | |||
444 | ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls); | 443 | ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls); |
445 | if (ret) { | 444 | if (ret) { |
446 | nr_calls--; | 445 | nr_calls--; |
447 | printk(KERN_WARNING "%s: attempt to bring up CPU %u failed\n", | 446 | pr_warn("%s: attempt to bring up CPU %u failed\n", |
448 | __func__, cpu); | 447 | __func__, cpu); |
449 | goto out_notify; | 448 | goto out_notify; |
450 | } | 449 | } |
451 | 450 | ||
@@ -475,11 +474,10 @@ int cpu_up(unsigned int cpu) | |||
475 | int err = 0; | 474 | int err = 0; |
476 | 475 | ||
477 | if (!cpu_possible(cpu)) { | 476 | if (!cpu_possible(cpu)) { |
478 | printk(KERN_ERR "can't online cpu %d because it is not " | 477 | pr_err("can't online cpu %d because it is not configured as may-hotadd at boot time\n", |
479 | "configured as may-hotadd at boot time\n", cpu); | 478 | cpu); |
480 | #if defined(CONFIG_IA64) | 479 | #if defined(CONFIG_IA64) |
481 | printk(KERN_ERR "please check additional_cpus= boot " | 480 | pr_err("please check additional_cpus= boot parameter\n"); |
482 | "parameter\n"); | ||
483 | #endif | 481 | #endif |
484 | return -EINVAL; | 482 | return -EINVAL; |
485 | } | 483 | } |
@@ -518,7 +516,7 @@ int disable_nonboot_cpus(void) | |||
518 | */ | 516 | */ |
519 | cpumask_clear(frozen_cpus); | 517 | cpumask_clear(frozen_cpus); |
520 | 518 | ||
521 | printk("Disabling non-boot CPUs ...\n"); | 519 | pr_info("Disabling non-boot CPUs ...\n"); |
522 | for_each_online_cpu(cpu) { | 520 | for_each_online_cpu(cpu) { |
523 | if (cpu == first_cpu) | 521 | if (cpu == first_cpu) |
524 | continue; | 522 | continue; |
@@ -526,8 +524,7 @@ int disable_nonboot_cpus(void) | |||
526 | if (!error) | 524 | if (!error) |
527 | cpumask_set_cpu(cpu, frozen_cpus); | 525 | cpumask_set_cpu(cpu, frozen_cpus); |
528 | else { | 526 | else { |
529 | printk(KERN_ERR "Error taking CPU%d down: %d\n", | 527 | pr_err("Error taking CPU%d down: %d\n", cpu, error); |
530 | cpu, error); | ||
531 | break; | 528 | break; |
532 | } | 529 | } |
533 | } | 530 | } |
@@ -537,7 +534,7 @@ int disable_nonboot_cpus(void) | |||
537 | /* Make sure the CPUs won't be enabled by someone else */ | 534 | /* Make sure the CPUs won't be enabled by someone else */ |
538 | cpu_hotplug_disabled = 1; | 535 | cpu_hotplug_disabled = 1; |
539 | } else { | 536 | } else { |
540 | printk(KERN_ERR "Non-boot CPUs are not disabled\n"); | 537 | pr_err("Non-boot CPUs are not disabled\n"); |
541 | } | 538 | } |
542 | cpu_maps_update_done(); | 539 | cpu_maps_update_done(); |
543 | return error; | 540 | return error; |
@@ -561,17 +558,17 @@ void __ref enable_nonboot_cpus(void) | |||
561 | if (cpumask_empty(frozen_cpus)) | 558 | if (cpumask_empty(frozen_cpus)) |
562 | goto out; | 559 | goto out; |
563 | 560 | ||
564 | printk(KERN_INFO "Enabling non-boot CPUs ...\n"); | 561 | pr_info("Enabling non-boot CPUs ...\n"); |
565 | 562 | ||
566 | arch_enable_nonboot_cpus_begin(); | 563 | arch_enable_nonboot_cpus_begin(); |
567 | 564 | ||
568 | for_each_cpu(cpu, frozen_cpus) { | 565 | for_each_cpu(cpu, frozen_cpus) { |
569 | error = _cpu_up(cpu, 1); | 566 | error = _cpu_up(cpu, 1); |
570 | if (!error) { | 567 | if (!error) { |
571 | printk(KERN_INFO "CPU%d is up\n", cpu); | 568 | pr_info("CPU%d is up\n", cpu); |
572 | continue; | 569 | continue; |
573 | } | 570 | } |
574 | printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error); | 571 | pr_warn("Error taking CPU%d up: %d\n", cpu, error); |
575 | } | 572 | } |
576 | 573 | ||
577 | arch_enable_nonboot_cpus_end(); | 574 | arch_enable_nonboot_cpus_end(); |