提交 544af642 编写于 作者: S Srikar Dronamraju 提交者: Michael Ellerman

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: NMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: NSrikar Dronamraju <srikar@linux.vnet.ibm.com>
[mpe: Rebase on to powerpc/next form2 affinity changes]
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210826100521.412639-2-srikar@linux.vnet.ibm.com
上级 5bf63497
...@@ -40,9 +40,6 @@ static int numa_enabled = 1; ...@@ -40,9 +40,6 @@ static int numa_enabled = 1;
static char *cmdline __initdata; static char *cmdline __initdata;
static int numa_debug;
#define dbg(args...) if (numa_debug) { printk(KERN_INFO args); }
int numa_cpu_lookup_table[NR_CPUS]; int numa_cpu_lookup_table[NR_CPUS];
cpumask_var_t node_to_cpumask_map[MAX_NUMNODES]; cpumask_var_t node_to_cpumask_map[MAX_NUMNODES];
struct pglist_data *node_data[MAX_NUMNODES]; struct pglist_data *node_data[MAX_NUMNODES];
...@@ -87,7 +84,7 @@ static void __init setup_node_to_cpumask_map(void) ...@@ -87,7 +84,7 @@ static void __init setup_node_to_cpumask_map(void)
alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]); alloc_bootmem_cpumask_var(&node_to_cpumask_map[node]);
/* cpumask_of_node() will now work */ /* cpumask_of_node() will now work */
dbg("Node to cpumask map for %u nodes\n", nr_node_ids); pr_debug("Node to cpumask map for %u nodes\n", nr_node_ids);
} }
static int __init fake_numa_create_new_node(unsigned long end_pfn, 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, ...@@ -131,7 +128,7 @@ static int __init fake_numa_create_new_node(unsigned long end_pfn,
cmdline = p; cmdline = p;
fake_nid++; fake_nid++;
*nid = fake_nid; *nid = fake_nid;
dbg("created new fake_node with id %d\n", fake_nid); pr_debug("created new fake_node with id %d\n", fake_nid);
return 1; return 1;
} }
return 0; return 0;
...@@ -149,7 +146,7 @@ static void map_cpu_to_node(int cpu, int node) ...@@ -149,7 +146,7 @@ static void map_cpu_to_node(int cpu, int node)
{ {
update_numa_cpu_lookup_table(cpu, node); update_numa_cpu_lookup_table(cpu, node);
dbg("adding cpu %d to node %d\n", cpu, node); pr_debug("adding cpu %d to node %d\n", cpu, node);
if (!(cpumask_test_cpu(cpu, node_to_cpumask_map[node]))) if (!(cpumask_test_cpu(cpu, node_to_cpumask_map[node])))
cpumask_set_cpu(cpu, node_to_cpumask_map[node]); cpumask_set_cpu(cpu, node_to_cpumask_map[node]);
...@@ -160,7 +157,7 @@ static void unmap_cpu_from_node(unsigned long cpu) ...@@ -160,7 +157,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
{ {
int node = numa_cpu_lookup_table[cpu]; int node = numa_cpu_lookup_table[cpu];
dbg("removing cpu %lu from node %d\n", cpu, node); pr_debug("removing cpu %lu from node %d\n", cpu, node);
if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) { if (cpumask_test_cpu(cpu, node_to_cpumask_map[node])) {
cpumask_clear_cpu(cpu, node_to_cpumask_map[node]); cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
...@@ -450,10 +447,10 @@ static int __init find_primary_domain_index(void) ...@@ -450,10 +447,10 @@ static int __init find_primary_domain_index(void)
if (firmware_has_feature(FW_FEATURE_OPAL)) { if (firmware_has_feature(FW_FEATURE_OPAL)) {
affinity_form = FORM1_AFFINITY; affinity_form = FORM1_AFFINITY;
} else if (firmware_has_feature(FW_FEATURE_FORM2_AFFINITY)) { } else if (firmware_has_feature(FW_FEATURE_FORM2_AFFINITY)) {
dbg("Using form 2 affinity\n"); pr_debug("Using form 2 affinity\n");
affinity_form = FORM2_AFFINITY; affinity_form = FORM2_AFFINITY;
} else if (firmware_has_feature(FW_FEATURE_FORM1_AFFINITY)) { } else if (firmware_has_feature(FW_FEATURE_FORM1_AFFINITY)) {
dbg("Using form 1 affinity\n"); pr_debug("Using form 1 affinity\n");
affinity_form = FORM1_AFFINITY; affinity_form = FORM1_AFFINITY;
} else } else
affinity_form = FORM0_AFFINITY; affinity_form = FORM0_AFFINITY;
...@@ -482,7 +479,7 @@ static int __init find_primary_domain_index(void) ...@@ -482,7 +479,7 @@ static int __init find_primary_domain_index(void)
&distance_ref_points_depth); &distance_ref_points_depth);
if (!distance_ref_points) { if (!distance_ref_points) {
dbg("NUMA: ibm,associativity-reference-points not found.\n"); pr_debug("NUMA: ibm,associativity-reference-points not found.\n");
goto err; goto err;
} }
...@@ -928,7 +925,7 @@ static int __init parse_numa_properties(void) ...@@ -928,7 +925,7 @@ static int __init parse_numa_properties(void)
return primary_domain_index; return primary_domain_index;
} }
dbg("NUMA associativity depth for CPU/Memory: %d\n", primary_domain_index); pr_debug("NUMA associativity depth for CPU/Memory: %d\n", primary_domain_index);
/* /*
* If it is FORM2 initialize the distance table here. * If it is FORM2 initialize the distance table here.
...@@ -1251,9 +1248,6 @@ static int __init early_numa(char *p) ...@@ -1251,9 +1248,6 @@ static int __init early_numa(char *p)
if (strstr(p, "off")) if (strstr(p, "off"))
numa_enabled = 0; numa_enabled = 0;
if (strstr(p, "debug"))
numa_debug = 1;
p = strstr(p, "fake="); p = strstr(p, "fake=");
if (p) if (p)
cmdline = p + strlen("fake="); cmdline = p + strlen("fake=");
...@@ -1416,7 +1410,7 @@ static long vphn_get_associativity(unsigned long cpu, ...@@ -1416,7 +1410,7 @@ static long vphn_get_associativity(unsigned long cpu,
switch (rc) { switch (rc) {
case H_SUCCESS: case H_SUCCESS:
dbg("VPHN hcall succeeded. Reset polling...\n"); pr_debug("VPHN hcall succeeded. Reset polling...\n");
goto out; goto out;
case H_FUNCTION: case H_FUNCTION:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册