Commit 84117da5 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds

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: default avatarFabian 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2c0d259e
...@@ -283,8 +283,7 @@ static inline void check_for_tasks(int cpu) ...@@ -283,8 +283,7 @@ static inline void check_for_tasks(int cpu)
task_cputime(p, &utime, &stime); task_cputime(p, &utime, &stime);
if (task_cpu(p) == cpu && p->state == TASK_RUNNING && if (task_cpu(p) == cpu && p->state == TASK_RUNNING &&
(utime || stime)) (utime || stime))
printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d " pr_warn("Task %s (pid = %d) is on cpu %d (state = %ld, flags = %x)\n",
"(state = %ld, flags = %x)\n",
p->comm, task_pid_nr(p), cpu, p->comm, task_pid_nr(p), cpu,
p->state, p->flags); p->state, p->flags);
} }
...@@ -336,8 +335,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen) ...@@ -336,8 +335,8 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
if (err) { if (err) {
nr_calls--; nr_calls--;
__cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL); __cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL);
printk("%s: attempt to take down CPU %u failed\n", pr_warn("%s: attempt to take down CPU %u failed\n",
__func__, cpu); __func__, cpu);
goto out_release; goto out_release;
} }
...@@ -444,8 +443,8 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen) ...@@ -444,8 +443,8 @@ static int _cpu_up(unsigned int cpu, int tasks_frozen)
ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls); ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
if (ret) { if (ret) {
nr_calls--; nr_calls--;
printk(KERN_WARNING "%s: attempt to bring up CPU %u failed\n", pr_warn("%s: attempt to bring up CPU %u failed\n",
__func__, cpu); __func__, cpu);
goto out_notify; goto out_notify;
} }
...@@ -475,11 +474,10 @@ int cpu_up(unsigned int cpu) ...@@ -475,11 +474,10 @@ int cpu_up(unsigned int cpu)
int err = 0; int err = 0;
if (!cpu_possible(cpu)) { if (!cpu_possible(cpu)) {
printk(KERN_ERR "can't online cpu %d because it is not " pr_err("can't online cpu %d because it is not configured as may-hotadd at boot time\n",
"configured as may-hotadd at boot time\n", cpu); cpu);
#if defined(CONFIG_IA64) #if defined(CONFIG_IA64)
printk(KERN_ERR "please check additional_cpus= boot " pr_err("please check additional_cpus= boot parameter\n");
"parameter\n");
#endif #endif
return -EINVAL; return -EINVAL;
} }
...@@ -518,7 +516,7 @@ int disable_nonboot_cpus(void) ...@@ -518,7 +516,7 @@ int disable_nonboot_cpus(void)
*/ */
cpumask_clear(frozen_cpus); cpumask_clear(frozen_cpus);
printk("Disabling non-boot CPUs ...\n"); pr_info("Disabling non-boot CPUs ...\n");
for_each_online_cpu(cpu) { for_each_online_cpu(cpu) {
if (cpu == first_cpu) if (cpu == first_cpu)
continue; continue;
...@@ -526,8 +524,7 @@ int disable_nonboot_cpus(void) ...@@ -526,8 +524,7 @@ int disable_nonboot_cpus(void)
if (!error) if (!error)
cpumask_set_cpu(cpu, frozen_cpus); cpumask_set_cpu(cpu, frozen_cpus);
else { else {
printk(KERN_ERR "Error taking CPU%d down: %d\n", pr_err("Error taking CPU%d down: %d\n", cpu, error);
cpu, error);
break; break;
} }
} }
...@@ -537,7 +534,7 @@ int disable_nonboot_cpus(void) ...@@ -537,7 +534,7 @@ int disable_nonboot_cpus(void)
/* Make sure the CPUs won't be enabled by someone else */ /* Make sure the CPUs won't be enabled by someone else */
cpu_hotplug_disabled = 1; cpu_hotplug_disabled = 1;
} else { } else {
printk(KERN_ERR "Non-boot CPUs are not disabled\n"); pr_err("Non-boot CPUs are not disabled\n");
} }
cpu_maps_update_done(); cpu_maps_update_done();
return error; return error;
...@@ -561,17 +558,17 @@ void __ref enable_nonboot_cpus(void) ...@@ -561,17 +558,17 @@ void __ref enable_nonboot_cpus(void)
if (cpumask_empty(frozen_cpus)) if (cpumask_empty(frozen_cpus))
goto out; goto out;
printk(KERN_INFO "Enabling non-boot CPUs ...\n"); pr_info("Enabling non-boot CPUs ...\n");
arch_enable_nonboot_cpus_begin(); arch_enable_nonboot_cpus_begin();
for_each_cpu(cpu, frozen_cpus) { for_each_cpu(cpu, frozen_cpus) {
error = _cpu_up(cpu, 1); error = _cpu_up(cpu, 1);
if (!error) { if (!error) {
printk(KERN_INFO "CPU%d is up\n", cpu); pr_info("CPU%d is up\n", cpu);
continue; continue;
} }
printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error); pr_warn("Error taking CPU%d up: %d\n", cpu, error);
} }
arch_enable_nonboot_cpus_end(); arch_enable_nonboot_cpus_end();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment