Skip to content

Commit 544af64

Browse files
srikardmpe
authored andcommitted
powerpc/numa: Drop dbg in favour of pr_debug
powerpc supported numa=debug which is not documented. This option was used to print early debug output. However something more flexible can be achieved by using CONFIG_DYNAMIC_DEBUG. Hence drop dbg (and numa=debug) in favour of pr_debug Suggested-by: Michael Ellerman <[email protected]> Signed-off-by: Srikar Dronamraju <[email protected]> [mpe: Rebase on to powerpc/next form2 affinity changes] Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5bf6349 commit 544af64

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

arch/powerpc/mm/numa.c

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ static int numa_enabled = 1;
4040

4141
static char *cmdline __initdata;
4242

43-
static int numa_debug;
44-
#define dbg(args...) if (numa_debug) { printk(KERN_INFO args); }
45-
4643
int numa_cpu_lookup_table[NR_CPUS];
4744
cpumask_var_t node_to_cpumask_map[MAX_NUMNODES];
4845
struct pglist_data *node_data[MAX_NUMNODES];
@@ -87,7 +84,7 @@ static void __init setup_node_to_cpumask_map(void)
8784
alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]);
8885

8986
/* cpumask_of_node() will now work */
90-
dbg("Node to cpumask map for %u nodes\n", nr_node_ids);
87+
pr_debug("Node to cpumask map for %u nodes\n", nr_node_ids);
9188
}
9289

9390
static int __init fake_numa_create_new_node(unsigned long end_pfn,
@@ -131,7 +128,7 @@ static int __init fake_numa_create_new_node(unsigned long end_pfn,
131128
cmdline = p;
132129
fake_nid++;
133130
*nid = fake_nid;
134-
dbg("created new fake_node with id %d\n", fake_nid);
131+
pr_debug("created new fake_node with id %d\n", fake_nid);
135132
return 1;
136133
}
137134
return 0;
@@ -149,7 +146,7 @@ static void map_cpu_to_node(int cpu, int node)
149146
{
150147
update_numa_cpu_lookup_table(cpu, node);
151148

152-
dbg("adding cpu %d to node %d\n", cpu, node);
149+
pr_debug("adding cpu %d to node %d\n", cpu, node);
153150

154151
if (!(cpumask_test_cpu(cpu, node_to_cpumask_map[node])))
155152
cpumask_set_cpu(cpu, node_to_cpumask_map[node]);
@@ -160,7 +157,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
160157
{
161158
int node = numa_cpu_lookup_table[cpu];
162159

163-
dbg("removing cpu %lu from node %d\n", cpu, node);
160+
pr_debug("removing cpu %lu from node %d\n", cpu, node);
164161

165162
if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
166163
cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
@@ -450,10 +447,10 @@ static int __init find_primary_domain_index(void)
450447
if (firmware_has_feature(FW_FEATURE_OPAL)) {
451448
affinity_form = FORM1_AFFINITY;
452449
} else if (firmware_has_feature(FW_FEATURE_FORM2_AFFINITY)) {
453-
dbg("Using form 2 affinity\n");
450+
pr_debug("Using form 2 affinity\n");
454451
affinity_form = FORM2_AFFINITY;
455452
} else if (firmware_has_feature(FW_FEATURE_FORM1_AFFINITY)) {
456-
dbg("Using form 1 affinity\n");
453+
pr_debug("Using form 1 affinity\n");
457454
affinity_form = FORM1_AFFINITY;
458455
} else
459456
affinity_form = FORM0_AFFINITY;
@@ -482,7 +479,7 @@ static int __init find_primary_domain_index(void)
482479
&distance_ref_points_depth);
483480

484481
if (!distance_ref_points) {
485-
dbg("NUMA: ibm,associativity-reference-points not found.\n");
482+
pr_debug("NUMA: ibm,associativity-reference-points not found.\n");
486483
goto err;
487484
}
488485

@@ -928,7 +925,7 @@ static int __init parse_numa_properties(void)
928925
return primary_domain_index;
929926
}
930927

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

933930
/*
934931
* If it is FORM2 initialize the distance table here.
@@ -1251,9 +1248,6 @@ static int __init early_numa(char *p)
12511248
if (strstr(p, "off"))
12521249
numa_enabled = 0;
12531250

1254-
if (strstr(p, "debug"))
1255-
numa_debug = 1;
1256-
12571251
p = strstr(p, "fake=");
12581252
if (p)
12591253
cmdline = p + strlen("fake=");
@@ -1416,7 +1410,7 @@ static long vphn_get_associativity(unsigned long cpu,
14161410

14171411
switch (rc) {
14181412
case H_SUCCESS:
1419-
dbg("VPHN hcall succeeded. Reset polling...\n");
1413+
pr_debug("VPHN hcall succeeded. Reset polling...\n");
14201414
goto out;
14211415

14221416
case H_FUNCTION:

0 commit comments

Comments
 (0)