Commit 3dda4481 authored by Hanjun Guo's avatar Hanjun Guo Committed by Rafael J. Wysocki

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: default avatarHanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: default avatarRobert Richter <rrichter@cavium.com>
Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ac906a6d
...@@ -31,10 +31,6 @@ ...@@ -31,10 +31,6 @@
#include <linux/nodemask.h> #include <linux/nodemask.h>
#include <linux/topology.h> #include <linux/topology.h>
#define ACPI_NUMA 0x80000000
#define _COMPONENT ACPI_NUMA
ACPI_MODULE_NAME("numa");
static nodemask_t nodes_found_map = NODE_MASK_NONE; static nodemask_t nodes_found_map = NODE_MASK_NONE;
/* maps to convert between proximity domain and logical node ID */ /* maps to convert between proximity domain and logical node ID */
...@@ -129,64 +125,51 @@ EXPORT_SYMBOL(acpi_map_pxm_to_online_node); ...@@ -129,64 +125,51 @@ EXPORT_SYMBOL(acpi_map_pxm_to_online_node);
static void __init static void __init
acpi_table_print_srat_entry(struct acpi_subtable_header *header) acpi_table_print_srat_entry(struct acpi_subtable_header *header)
{ {
ACPI_FUNCTION_NAME("acpi_table_print_srat_entry");
if (!header) if (!header)
return; return;
switch (header->type) { switch (header->type) {
case ACPI_SRAT_TYPE_CPU_AFFINITY: case ACPI_SRAT_TYPE_CPU_AFFINITY:
#ifdef ACPI_DEBUG_OUTPUT
{ {
struct acpi_srat_cpu_affinity *p = struct acpi_srat_cpu_affinity *p =
(struct acpi_srat_cpu_affinity *)header; (struct acpi_srat_cpu_affinity *)header;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, pr_debug("SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n",
"SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n", p->apic_id, p->local_sapic_eid,
p->apic_id, p->local_sapic_eid, p->proximity_domain_lo,
p->proximity_domain_lo, (p->flags & ACPI_SRAT_CPU_ENABLED) ?
(p->flags & ACPI_SRAT_CPU_ENABLED)? "enabled" : "disabled");
"enabled" : "disabled"));
} }
#endif /* ACPI_DEBUG_OUTPUT */
break; break;
case ACPI_SRAT_TYPE_MEMORY_AFFINITY: case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
#ifdef ACPI_DEBUG_OUTPUT
{ {
struct acpi_srat_mem_affinity *p = struct acpi_srat_mem_affinity *p =
(struct acpi_srat_mem_affinity *)header; (struct acpi_srat_mem_affinity *)header;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, pr_debug("SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n",
"SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n", (unsigned long)p->base_address,
(unsigned long)p->base_address, (unsigned long)p->length,
(unsigned long)p->length, p->proximity_domain,
p->proximity_domain, (p->flags & ACPI_SRAT_MEM_ENABLED) ?
(p->flags & ACPI_SRAT_MEM_ENABLED)? "enabled" : "disabled",
"enabled" : "disabled", (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ?
(p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)? " hot-pluggable" : "",
" hot-pluggable" : "", (p->flags & ACPI_SRAT_MEM_NON_VOLATILE) ?
(p->flags & ACPI_SRAT_MEM_NON_VOLATILE)? " non-volatile" : "");
" non-volatile" : ""));
} }
#endif /* ACPI_DEBUG_OUTPUT */
break; break;
case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY: case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY:
#ifdef ACPI_DEBUG_OUTPUT
{ {
struct acpi_srat_x2apic_cpu_affinity *p = struct acpi_srat_x2apic_cpu_affinity *p =
(struct acpi_srat_x2apic_cpu_affinity *)header; (struct acpi_srat_x2apic_cpu_affinity *)header;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, pr_debug("SRAT Processor (x2apicid[0x%08x]) in proximity domain %d %s\n",
"SRAT Processor (x2apicid[0x%08x]) in" p->apic_id,
" proximity domain %d %s\n", p->proximity_domain,
p->apic_id, (p->flags & ACPI_SRAT_CPU_ENABLED) ?
p->proximity_domain, "enabled" : "disabled");
(p->flags & ACPI_SRAT_CPU_ENABLED) ?
"enabled" : "disabled"));
} }
#endif /* ACPI_DEBUG_OUTPUT */
break; break;
default: default:
pr_warn("Found unsupported SRAT entry (type = 0x%x)\n", pr_warn("Found unsupported SRAT entry (type = 0x%x)\n",
header->type); header->type);
......
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