Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1406476

[PATCH v7 02/15] acpi, numa: Replace ACPI_DEBUG_PRINT() with pr_debug()

Path csiph.com!feeder.erje.net!1.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From David Daney <ddaney.cavm@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v7 02/15] acpi, numa: Replace ACPI_DEBUG_PRINT() with pr_debug()
Date Wed, 25 May 2016 00:40:01 +0200
Message-ID <rCt9v-R2-11@gated-at.bofh.it> (permalink)
References <rCt9v-R2-5@gated-at.bofh.it>
X-Original-To Will Deacon <will.deacon@arm.com>, linux-arm-kernel@lists.infradead.org, Mark Rutland <mark.rutland@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>, x86@kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>, Len Brown <lenb@kernel.org>, Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com>, Grant Likely <grant.likely@linaro.org>, Robert Moore <robert.moore@intel.com>, Lv Zheng <lv.zheng@intel.com>, Hanjun Guo <hanjun.guo@linaro.org>, Marc Zyngier <Marc.Zyngier@arm.com>, linux-ia64@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NoeMukk3cLQXBRyXw92X6uqVG/scGYc2/t1gSjAwxIM=; b=ZukwGYH6fitlveGhNLblhrRkUFxY5cessi4kUVkBgbwpsI8Lf2ldQnkhK3I28WVY+N hN3yLsCVq0YxZsF2CYALlIzU+IfJHRei/Vm+8G+HpDu5mze8Rmz//6ZlNfGndBsfRfF+ WpSlQ+QDjPGBXK2IqHXQgiZsCUmrUT+SEA0OggijTACVWrrzIw+tRTF6UuSOnuZ9xcIh m35l4oiUB1ReTyS7Q2CAxleXbzteXQCihxHdXKvi1Pn6aXBwIVa5sDxGzmXHLH4iaIdW 9iG2BI4SF9/jE3d2iwldOWAlvCm1N5zToL5RgmETRTleqnHrSjiZ9i20EsrGSV0oRBpr VqeQ==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NoeMukk3cLQXBRyXw92X6uqVG/scGYc2/t1gSjAwxIM=; b=SbjR0lO4pKBdxpbvebOsBEKomxjhiaKmw3/TyUv3c3Ldx/yc4I19DjLjvCmLQM2TLK fA+CKpd30bShHglTCilWOm9fmDxDhNnZu4qSgsLa8ZkRD08e7EQiaRIi+HsZVXZ/JJbq SVD6YQogyG4G0h0yluEKwAACbbSDEO0xrvRUZxOGGeJwhLaeqfqPcLFxiG/5aXtNieFI hrVfCWgJ/e77zftTT7yIA3RjxvHb0KIud4YdygdPVmQrG+HTXVHW+j5nLFofd8A/PrrD OABCodKHxGLzR6LS/yOPfWH0M2V9Pxv+eC71YHRoTjajSOMB1qaFcG7jn643eRl9qA0f A74Q==
X-Gm-Message-State ALyK8tJ9+f4nyz4omgr5rMi0OdrRIpLYzP73z1cOqC8MAbrB7s7DEnuCzMW+M3HOXFy1Iw==
X-Received by 10.98.22.141 with SMTP id 135mr875924pfw.116.1464129363048; Tue, 24 May 2016 15:36:03 -0700 (PDT)
X-Mailer git-send-email 1.7.11.7
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 125
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, Robert Richter <rrichter@cavium.com>, David Daney <david.daney@cavium.com>
X-Original-Date Tue, 24 May 2016 15:35:32 -0700
X-Original-Message-ID <1464129345-18985-3-git-send-email-ddaney.cavm@gmail.com>
X-Original-References <1464129345-18985-1-git-send-email-ddaney.cavm@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1406476

Show key headers only | View raw


From: Hanjun Guo <hanjun.guo@linaro.org>

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>
---
 drivers/acpi/numa.c | 59 +++++++++++++++++++----------------------------------
 1 file changed, 21 insertions(+), 38 deletions(-)

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index bdb7622..a089c39 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -31,10 +31,6 @@
 #include <linux/nodemask.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;
 
 /* maps to convert between proximity domain and logical node ID */
@@ -129,64 +125,51 @@ EXPORT_SYMBOL(acpi_map_pxm_to_online_node);
 static void __init
 acpi_table_print_srat_entry(struct acpi_subtable_header *header)
 {
-
-	ACPI_FUNCTION_NAME("acpi_table_print_srat_entry");
-
 	if (!header)
 		return;
 
 	switch (header->type) {
-
 	case ACPI_SRAT_TYPE_CPU_AFFINITY:
-#ifdef ACPI_DEBUG_OUTPUT
 		{
 			struct acpi_srat_cpu_affinity *p =
 			    (struct acpi_srat_cpu_affinity *)header;
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					  "SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n",
-					  p->apic_id, p->local_sapic_eid,
-					  p->proximity_domain_lo,
-					  (p->flags & ACPI_SRAT_CPU_ENABLED)?
-					  "enabled" : "disabled"));
+			pr_debug("SRAT Processor (id[0x%02x] eid[0x%02x]) in proximity domain %d %s\n",
+				 p->apic_id, p->local_sapic_eid,
+				 p->proximity_domain_lo,
+				 (p->flags & ACPI_SRAT_CPU_ENABLED) ?
+				 "enabled" : "disabled");
 		}
-#endif				/* ACPI_DEBUG_OUTPUT */
 		break;
 
 	case ACPI_SRAT_TYPE_MEMORY_AFFINITY:
-#ifdef ACPI_DEBUG_OUTPUT
 		{
 			struct acpi_srat_mem_affinity *p =
 			    (struct acpi_srat_mem_affinity *)header;
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					  "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n",
-					  (unsigned long)p->base_address,
-					  (unsigned long)p->length,
-					  p->proximity_domain,
-					  (p->flags & ACPI_SRAT_MEM_ENABLED)?
-					  "enabled" : "disabled",
-					  (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)?
-					  " hot-pluggable" : "",
-					  (p->flags & ACPI_SRAT_MEM_NON_VOLATILE)?
-					  " non-volatile" : ""));
+			pr_debug("SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s%s\n",
+				 (unsigned long)p->base_address,
+				 (unsigned long)p->length,
+				 p->proximity_domain,
+				 (p->flags & ACPI_SRAT_MEM_ENABLED) ?
+				 "enabled" : "disabled",
+				 (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE) ?
+				 " hot-pluggable" : "",
+				 (p->flags & ACPI_SRAT_MEM_NON_VOLATILE) ?
+				 " non-volatile" : "");
 		}
-#endif				/* ACPI_DEBUG_OUTPUT */
 		break;
 
 	case ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY:
-#ifdef ACPI_DEBUG_OUTPUT
 		{
 			struct acpi_srat_x2apic_cpu_affinity *p =
 			    (struct acpi_srat_x2apic_cpu_affinity *)header;
-			ACPI_DEBUG_PRINT((ACPI_DB_INFO,
-					  "SRAT Processor (x2apicid[0x%08x]) in"
-					  " proximity domain %d %s\n",
-					  p->apic_id,
-					  p->proximity_domain,
-					  (p->flags & ACPI_SRAT_CPU_ENABLED) ?
-					  "enabled" : "disabled"));
+			pr_debug("SRAT Processor (x2apicid[0x%08x]) in proximity domain %d %s\n",
+				 p->apic_id,
+				 p->proximity_domain,
+				 (p->flags & ACPI_SRAT_CPU_ENABLED) ?
+				 "enabled" : "disabled");
 		}
-#endif				/* ACPI_DEBUG_OUTPUT */
 		break;
+
 	default:
 		pr_warn("Found unsupported SRAT entry (type = 0x%x)\n",
 			header->type);
-- 
1.7.11.7

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 00/15] ACPI NUMA support for ARM64 David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 02/15] acpi, numa: Replace ACPI_DEBUG_PRINT() with pr_debug() David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 09/15] acpi, numa: move bad_srat() and srat_disabled() to drivers/acpi/numa.c David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 12/15] acpi, numa, srat: Improve SRAT error detection and add messages. David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 13/15] ACPI / processor: Add acpi_map_madt_entry(). David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
    Re: [PATCH v7 13/15] ACPI / processor: Add acpi_map_madt_entry(). Catalin Marinas <catalin.marinas@arm.com> - 2016-05-25 16:50 +0200
  [PATCH v7 11/15] acpi, numa: Move acpi_numa_memory_affinity_init() to drivers/acpi/numa.c David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 10/15] acpi, numa: remove unneeded acpi_numa=1 David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT and SLIT David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
    Re: [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT  and SLIT Catalin Marinas <catalin.marinas@arm.com> - 2016-05-25 16:50 +0200
    Re: [PATCH v7 14/15] arm64, acpi, numa: NUMA support based on SRAT  and SLIT Dennis Chen <dennis.chen@linaro.org> - 2016-05-27 10:10 +0200
  [PATCH v7 15/15] acpi, numa: Enable ACPI based NUMA on ARM64 David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 05/15] acpi, numa: move acpi_numa_slit_init() to drivers/acpi/numa.c David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 07/15] arm64, numa: Cleanup NUMA disabled messages. David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
    Re: [PATCH v7 07/15] arm64, numa: Cleanup NUMA disabled messages. Dennis Chen <dennis.chen@linaro.org> - 2016-05-27 10:00 +0200
  [PATCH v7 08/15] x86, acpi, numa: cleanup acpi_numa_processor_affinity_init() David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:40 +0200
  [PATCH v7 06/15] arm64, numa: rework numa_add_memblk() David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:50 +0200
  [PATCH v7 04/15] acpi, numa: Move acpi_numa_arch_fixup() to ia64 only David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:50 +0200
  [PATCH v7 03/15] acpi, numa: remove duplicate NULL check David Daney <ddaney.cavm@gmail.com> - 2016-05-25 00:50 +0200

csiph-web