Commit efa59ab3 authored by Andrew Banman's avatar Andrew Banman Committed by Ingo Molnar

x86/platform/uv/BAU: Clean up and update printks

Replace all uses of printk with the appropriate pr_*() function.
Signed-off-by: default avatarAndrew Banman <abanman@sgi.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Acked-by: default avatarMike Travis <travis@sgi.com>
Acked-by: default avatarDimitri Sivanich <sivanich@sgi.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: akpm@linux-foundation.org
Cc: rja@sgi.com
Link: http://lkml.kernel.org/r/1474474161-265604-3-git-send-email-abanman@sgi.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 67492c86
...@@ -1497,16 +1497,16 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user, ...@@ -1497,16 +1497,16 @@ static ssize_t ptc_proc_write(struct file *file, const char __user *user,
} }
if (kstrtol(optstr, 10, &input_arg) < 0) { if (kstrtol(optstr, 10, &input_arg) < 0) {
printk(KERN_DEBUG "%s is invalid\n", optstr); pr_debug("%s is invalid\n", optstr);
return -EINVAL; return -EINVAL;
} }
if (input_arg == 0) { if (input_arg == 0) {
elements = ARRAY_SIZE(stat_description); elements = ARRAY_SIZE(stat_description);
printk(KERN_DEBUG "# cpu: cpu number\n"); pr_debug("# cpu: cpu number\n");
printk(KERN_DEBUG "Sender statistics:\n"); pr_debug("Sender statistics:\n");
for (i = 0; i < elements; i++) for (i = 0; i < elements; i++)
printk(KERN_DEBUG "%s\n", stat_description[i]); pr_debug("%s\n", stat_description[i]);
} else if (input_arg == -1) { } else if (input_arg == -1) {
for_each_present_cpu(cpu) { for_each_present_cpu(cpu) {
stat = &per_cpu(ptcstats, cpu); stat = &per_cpu(ptcstats, cpu);
...@@ -1554,7 +1554,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr, ...@@ -1554,7 +1554,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr,
break; break;
} }
if (cnt != e) { if (cnt != e) {
printk(KERN_INFO "bau tunable error: should be %d values\n", e); pr_info("bau tunable error: should be %d values\n", e);
return -EINVAL; return -EINVAL;
} }
...@@ -1571,7 +1571,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr, ...@@ -1571,7 +1571,7 @@ static int parse_tunables_write(struct bau_control *bcp, char *instr,
continue; continue;
} }
if (val < 1 || val > bcp->cpus_in_uvhub) { if (val < 1 || val > bcp->cpus_in_uvhub) {
printk(KERN_DEBUG pr_debug(
"Error: BAU max concurrent %d is invalid\n", "Error: BAU max concurrent %d is invalid\n",
val); val);
return -EINVAL; return -EINVAL;
...@@ -1676,21 +1676,21 @@ static int __init uv_ptc_init(void) ...@@ -1676,21 +1676,21 @@ static int __init uv_ptc_init(void)
proc_uv_ptc = proc_create(UV_PTC_BASENAME, 0444, NULL, proc_uv_ptc = proc_create(UV_PTC_BASENAME, 0444, NULL,
&proc_uv_ptc_operations); &proc_uv_ptc_operations);
if (!proc_uv_ptc) { if (!proc_uv_ptc) {
printk(KERN_ERR "unable to create %s proc entry\n", pr_err("unable to create %s proc entry\n",
UV_PTC_BASENAME); UV_PTC_BASENAME);
return -EINVAL; return -EINVAL;
} }
tunables_dir = debugfs_create_dir(UV_BAU_TUNABLES_DIR, NULL); tunables_dir = debugfs_create_dir(UV_BAU_TUNABLES_DIR, NULL);
if (!tunables_dir) { if (!tunables_dir) {
printk(KERN_ERR "unable to create debugfs directory %s\n", pr_err("unable to create debugfs directory %s\n",
UV_BAU_TUNABLES_DIR); UV_BAU_TUNABLES_DIR);
return -EINVAL; return -EINVAL;
} }
tunables_file = debugfs_create_file(UV_BAU_TUNABLES_FILE, 0600, tunables_file = debugfs_create_file(UV_BAU_TUNABLES_FILE, 0600,
tunables_dir, NULL, &tunables_fops); tunables_dir, NULL, &tunables_fops);
if (!tunables_file) { if (!tunables_file) {
printk(KERN_ERR "unable to create debugfs file %s\n", pr_err("unable to create debugfs file %s\n",
UV_BAU_TUNABLES_FILE); UV_BAU_TUNABLES_FILE);
return -EINVAL; return -EINVAL;
} }
...@@ -1944,7 +1944,7 @@ static int __init get_cpu_topology(int base_pnode, ...@@ -1944,7 +1944,7 @@ static int __init get_cpu_topology(int base_pnode,
pnode = uv_cpu_hub_info(cpu)->pnode; pnode = uv_cpu_hub_info(cpu)->pnode;
if ((pnode - base_pnode) >= UV_DISTRIBUTION_SIZE) { if ((pnode - base_pnode) >= UV_DISTRIBUTION_SIZE) {
printk(KERN_EMERG pr_emerg(
"cpu %d pnode %d-%d beyond %d; BAU disabled\n", "cpu %d pnode %d-%d beyond %d; BAU disabled\n",
cpu, pnode, base_pnode, UV_DISTRIBUTION_SIZE); cpu, pnode, base_pnode, UV_DISTRIBUTION_SIZE);
return 1; return 1;
...@@ -1969,7 +1969,7 @@ static int __init get_cpu_topology(int base_pnode, ...@@ -1969,7 +1969,7 @@ static int __init get_cpu_topology(int base_pnode,
sdp->cpu_number[sdp->num_cpus] = cpu; sdp->cpu_number[sdp->num_cpus] = cpu;
sdp->num_cpus++; sdp->num_cpus++;
if (sdp->num_cpus > MAX_CPUS_PER_SOCKET) { if (sdp->num_cpus > MAX_CPUS_PER_SOCKET) {
printk(KERN_EMERG "%d cpus per socket invalid\n", pr_emerg("%d cpus per socket invalid\n",
sdp->num_cpus); sdp->num_cpus);
return 1; return 1;
} }
...@@ -2036,14 +2036,14 @@ static int scan_sock(struct socket_desc *sdp, struct uvhub_desc *bdp, ...@@ -2036,14 +2036,14 @@ static int scan_sock(struct socket_desc *sdp, struct uvhub_desc *bdp,
else if (is_uv3_hub()) else if (is_uv3_hub())
bcp->uvhub_version = 3; bcp->uvhub_version = 3;
else { else {
printk(KERN_EMERG "uvhub version not 1, 2 or 3\n"); pr_emerg("uvhub version not 1, 2, or 3\n");
return 1; return 1;
} }
bcp->uvhub_master = *hmasterp; bcp->uvhub_master = *hmasterp;
bcp->uvhub_cpu = uv_cpu_blade_processor_id(cpu); bcp->uvhub_cpu = uv_cpu_blade_processor_id(cpu);
if (bcp->uvhub_cpu >= MAX_CPUS_PER_UVHUB) { if (bcp->uvhub_cpu >= MAX_CPUS_PER_UVHUB) {
printk(KERN_EMERG "%d cpus per uvhub invalid\n", pr_emerg("%d cpus per uvhub invalid\n",
bcp->uvhub_cpu); bcp->uvhub_cpu);
return 1; return 1;
} }
......
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