diff options
author | Hanjun Guo <hanjun.guo@linaro.org> | 2016-05-24 18:35:32 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-05-30 08:27:07 -0400 |
commit | 3dda448189af1c55637628423487f607244fb669 (patch) | |
tree | d93de2932b32b99e5165678851f7ea700c07d30d | |
parent | ac906a6d56b742e13f9e600c7c7879b323cfbf15 (diff) |
ACPI / NUMA: Replace ACPI_DEBUG_PRINT() with pr_debug()
ACPI_DEBUG_PRINT is a bit fragile in acpi/numa.c, the first thing
is that component ACPI_NUMA(0x80000000) is not described in the
Documentation/acpi/debug.txt, and even not defined in the struct
acpi_dlayer acpi_debug_layers which we can not dynamically enable/disable
it with /sys/modules/acpi/parameters/debug_layer. another thing
is that ACPI_DEBUG_OUTPUT is controlled by ACPICA which not coordinate
well with ACPI drivers.
Replace ACPI_DEBUG_PRINT() with pr_debug() in this patch as pr_debug
will do the same thing for debug purpose and it can make the code much
cleaner, also remove the related code which not needed anymore if
ACPI_DEBUG_PRINT() is gone.
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/numa.c | 59 |
1 files changed, 21 insertions, 38 deletions
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index bdb762239b36..a089c396566d 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -31,10 +31,6 @@ | |||
31 | #include <linux/nodemask.h> | 31 | #include <linux/nodemask.h> |
32 | #include <linux/topology.h> | 32 | #include <linux/topology.h> |
33 | 33 | ||
34 | #define ACPI_NUMA 0x80000000 | ||
35 | #define _COMPONENT ACPI_NUMA | ||
36 | ACPI_MODULE_NAME("numa"); | ||
37 | |||
38 | static nodemask_t nodes_found_map = NODE_MASK_NONE; | 34 | static nodemask_t nodes_found_map = NODE_MASK_NONE; |
39 | 35 | ||
40 | /* maps to convert between proximity domain and logical node ID */ | 36 | /* maps to convert between proximity domain and logical node ID */ |
@@ -129,64 +125,51 @@ EXPORT_SYMBOL(acpi_map_pxm_to_online_node); | |||
129 | static void __init | 125 | static void __init |
130 | acpi_table_print_srat_entry(struct acpi_subtable_header *header) | 126 | acpi_table_print_srat_entry(struct acpi_subtable_header *header) |
131 | { | 127 | { |
132 | |||
133 | ACPI_FUNCTION_NAME("acpi_table_print_srat_entry"); | ||
134 | |||
135 | if (!header) | 128 | if (!header) |
136 | return; | 129 | return; |
137 | 130 | ||
138 | switch (header->type) { | 131 | switch (header->type) { |
139 | |||
140 | case ACPI_SRAT_TYPE_CPU_AFFINITY: | 132 | case ACPI_SRAT_TYPE_CPU_AFFINITY: |
141 | #ifdef ACPI_DEBUG_OUTPUT | ||
142 | { | 133 | { |
143 | struct acpi_srat_cpu_affinity *p = | 134 | struct acpi_srat_cpu_affinity *p = |
144 | (struct acpi_srat_cpu_affinity *)header; | 135 | (struct acpi_srat_cpu_affinity *)header; |
145 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 136 | pr_debug("SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n", |
146 | "SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n", | 137 | p->apic_id, p->local_sapic_eid, |
147 | p->apic_id, p->local_sapic_eid, | 138 | p->proximity_domain_lo, |
148 | p->proximity_domain_lo, | 139 | (p->flags & ACPI_SRAT_CPU_ENABLED) ? |
149 | (p->flags & ACPI_SRAT_CPU_ENABLED)? | 140 | "enabled" : "disabled"); |
150 | "enabled" : "disabled")); | ||
151 | } | 141 | } |
152 | #endif /* ACPI_DEBUG_OUTPUT */ | ||
153 | break; | 142 | break; |
154 | 143 | ||
155 | case ACPI_SRAT_TYPE_MEMORY_AFFINITY: | 144 | case ACPI_SRAT_TYPE_MEMORY_AFFINITY: |
156 | #ifdef ACPI_DEBUG_OUTPUT | ||
157 | { | 145 | { |
158 | struct acpi_srat_mem_affinity *p = | 146 | struct acpi_srat_mem_affinity *p = |
159 | (struct acpi_srat_mem_affinity *)header; | 147 | (struct acpi_srat_mem_affinity *)header; |
160 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 148 | pr_debug("SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n", |
161 | "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n", | 149 | (unsigned long)p->base_address, |
162 | (unsigned long)p->base_address, | 150 | (unsigned long)p->length, |
163 | (unsigned long)p->length, | 151 | p->proximity_domain, |
164 | p->proximity_domain, | 152 | (p->flags & ACPI_SRAT_MEM_ENABLED) ? |
165 | (p->flags & ACPI_SRAT_MEM_ENABLED)? | 153 | "enabled" : "disabled", |
166 | "enabled" : "disabled", | 154 | (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ? |
167 | (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)? | 155 | " hot-pluggable" : "", |
168 | " hot-pluggable" : "", | 156 | (p->flags & ACPI_SRAT_MEM_NON_VOLATILE) ? |
169 | (p->flags & ACPI_SRAT_MEM_NON_VOLATILE)? | 157 | " non-volatile" : ""); |
170 | " non-volatile" : "")); | ||
171 | } | 158 | } |
172 | #endif /* ACPI_DEBUG_OUTPUT */ | ||
173 | break; | 159 | break; |
174 | 160 | ||
175 | case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: | 161 | case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: |
176 | #ifdef ACPI_DEBUG_OUTPUT | ||
177 | { | 162 | { |
178 | struct acpi_srat_x2apic_cpu_affinity *p = | 163 | struct acpi_srat_x2apic_cpu_affinity *p = |
179 | (struct acpi_srat_x2apic_cpu_affinity *)header; | 164 | (struct acpi_srat_x2apic_cpu_affinity *)header; |
180 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 165 | pr_debug("SRAT Processor (x2apicid[0x%08x]) in proximity domain %d %s\n", |
181 | "SRAT Processor (x2apicid[0x%08x]) in" | 166 | p->apic_id, |
182 | " proximity domain %d %s\n", | 167 | p->proximity_domain, |
183 | p->apic_id, | 168 | (p->flags & ACPI_SRAT_CPU_ENABLED) ? |
184 | p->proximity_domain, | 169 | "enabled" : "disabled"); |
185 | (p->flags & ACPI_SRAT_CPU_ENABLED) ? | ||
186 | "enabled" : "disabled")); | ||
187 | } | 170 | } |
188 | #endif /* ACPI_DEBUG_OUTPUT */ | ||
189 | break; | 171 | break; |
172 | |||
190 | default: | 173 | default: |
191 | pr_warn("Found unsupported SRAT entry (type = 0x%x)\n", | 174 | pr_warn("Found unsupported SRAT entry (type = 0x%x)\n", |
192 | header->type); | 175 | header->type); |