Skip to content

Commit 506c207

Browse files
srikardmpe
authored andcommitted
powerpc/numa: convert printk to pr_xxx
Convert the remaining printk to pr_xxx One advantage would be all prints will now have prefix "numa:" from pr_fmt(). [ convert printk(KERN_ERR) to pr_warn : Suggested by Laurent Dufour ] Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Srikar Dronamraju <[email protected]> [mpe: Rebase onto powerpc/next, s/WARNING/Warning/] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 544af64 commit 506c207

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

arch/powerpc/mm/numa.c

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
162162
if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
163163
cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
164164
} else {
165-
printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
166-
cpu, node);
165+
pr_warn("Warning: cpu %lu not found in node %d\n", cpu, node);
167166
}
168167
}
169168
#endif /* CONFIG_HOTPLUG_CPU || CONFIG_PPC_SPLPAR */
@@ -479,15 +478,14 @@ static int __init find_primary_domain_index(void)
479478
&distance_ref_points_depth);
480479

481480
if (!distance_ref_points) {
482-
pr_debug("NUMA: ibm,associativity-reference-points not found.\n");
481+
pr_debug("ibm,associativity-reference-points not found.\n");
483482
goto err;
484483
}
485484

486485
distance_ref_points_depth /= sizeof(int);
487486
if (affinity_form == FORM0_AFFINITY) {
488487
if (distance_ref_points_depth < 2) {
489-
printk(KERN_WARNING "NUMA: "
490-
"short ibm,associativity-reference-points\n");
488+
pr_warn("short ibm,associativity-reference-points\n");
491489
goto err;
492490
}
493491

@@ -504,8 +502,8 @@ static int __init find_primary_domain_index(void)
504502
* MAX_DISTANCE_REF_POINTS domains.
505503
*/
506504
if (distance_ref_points_depth > MAX_DISTANCE_REF_POINTS) {
507-
printk(KERN_WARNING "NUMA: distance array capped at "
508-
"%d entries\n", MAX_DISTANCE_REF_POINTS);
505+
pr_warn("distance array capped at %d entries\n",
506+
MAX_DISTANCE_REF_POINTS);
509507
distance_ref_points_depth = MAX_DISTANCE_REF_POINTS;
510508
}
511509

@@ -910,7 +908,7 @@ static int __init parse_numa_properties(void)
910908
const __be32 *associativity;
911909

912910
if (numa_enabled == 0) {
913-
printk(KERN_WARNING "NUMA disabled by user\n");
911+
pr_warn("disabled by user\n");
914912
return -1;
915913
}
916914

@@ -925,7 +923,7 @@ static int __init parse_numa_properties(void)
925923
return primary_domain_index;
926924
}
927925

928-
pr_debug("NUMA associativity depth for CPU/Memory: %d\n", primary_domain_index);
926+
pr_debug("associativity depth for CPU/Memory: %d\n", primary_domain_index);
929927

930928
/*
931929
* If it is FORM2 initialize the distance table here.
@@ -1038,10 +1036,8 @@ static void __init setup_nonnuma(void)
10381036
unsigned int nid = 0;
10391037
int i;
10401038

1041-
printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
1042-
top_of_ram, total_ram);
1043-
printk(KERN_DEBUG "Memory hole size: %ldMB\n",
1044-
(top_of_ram - total_ram) >> 20);
1039+
pr_debug("Top of RAM: 0x%lx, Total RAM: 0x%lx\n", top_of_ram, total_ram);
1040+
pr_debug("Memory hole size: %ldMB\n", (top_of_ram - total_ram) >> 20);
10451041

10461042
for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, NULL) {
10471043
fake_numa_create_new_node(end_pfn, &nid);

0 commit comments

Comments
 (0)