From patchwork Wed Apr 20 01:40:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 8884781 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1FBBD9F36E for ; Wed, 20 Apr 2016 01:42:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26B1A2026F for ; Wed, 20 Apr 2016 01:42:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0443B202E5 for ; Wed, 20 Apr 2016 01:42:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932651AbcDTBk7 (ORCPT ); Tue, 19 Apr 2016 21:40:59 -0400 Received: from mail-pf0-f172.google.com ([209.85.192.172]:35455 "EHLO mail-pf0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932516AbcDTBkt (ORCPT ); Tue, 19 Apr 2016 21:40:49 -0400 Received: by mail-pf0-f172.google.com with SMTP id n1so12471748pfn.2; Tue, 19 Apr 2016 18:40:48 -0700 (PDT) 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=p3/SdTMRkPCEx8XWzZAE++5Qm6nGf079hpSpkb5kTjg=; b=X6/PZSmKRtk9GoTe11YNmQTdRKH0wZtEajMLn8wrQ3pjuN+kIJZEAHcMdgWefp5aAM YNPMuMGLF4tyN92qLOO8eqKJr3HKNplOr2qfkSPlq733IUMDznAu4isIa5KEouGE0gwp 6kdg/Kx3JeEsZOuwBpQxYWD0GQZuSJqW8585vcF5roOF2IDXLTupOLIw7gTvSHcF3+Wx 1ltjuwrYa5Jbasi7oB0ZfaQwMorfdsJgYmzGcwrD6EGlWtvQ23aFEk/noToT1B5piIVw riDKwVeNMP6Rqq5q2BuSUD1OUmLa2r0MbVTq8MPaFw0C3g/G0Ianx75JPAxXuHjuNV/n 7uGQ== 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=p3/SdTMRkPCEx8XWzZAE++5Qm6nGf079hpSpkb5kTjg=; b=eSn9BdhHlhm1UjU1bjsVx5kb+twUXc+xFHhkaEDsFOKWQTYVYi63YgvXpIolQ5qo/z RhG1HPyMxEPDeqvy34DVutsTDrz2KzZezKTlpw61b/NP3lwm7PDcUkG5NxlUsbyhTmEr chYpT3L12gkUJsFFBiARQMALmDveTxWhM3TEWBqigPzonEgW4It8fIX4d3UfRVV7zw8Q 5pxEYy4XgjcS4Y/QekfLTDUbh88Jmvk0J85lyXRYq5br9LbCTv/qh+XQT79D4kmE3J1L 8+JwuYE/Lprpu+5cWl6bQCQi7e/Vm77WK12EsH3ocgHIL4/eWnt25RuHwfkQ7SBXk1Lj 7E0w== X-Gm-Message-State: AOPr4FX6QKXAhVcDkv5pz6htOb8GHdNraM6/SJcnrMW+/VdP8oCCWI4A+KfNp6LlBhGMIw== X-Received: by 10.98.17.78 with SMTP id z75mr8734652pfi.40.1461116448367; Tue, 19 Apr 2016 18:40:48 -0700 (PDT) Received: from dl.caveonetworks.com ([64.2.3.194]) by smtp.gmail.com with ESMTPSA id ud5sm93903263pac.11.2016.04.19.18.40.45 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 19 Apr 2016 18:40:46 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id u3K1eiYq023046; Tue, 19 Apr 2016 18:40:44 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id u3K1eidZ023045; Tue, 19 Apr 2016 18:40:44 -0700 From: David Daney To: Will Deacon , linux-arm-kernel@lists.infradead.org, Mark Rutland , Catalin Marinas , Tony Luck , Fenghua Yu , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, "Rafael J. Wysocki" , Len Brown , Rob Herring , Frank Rowand , Grant Likely , Robert Moore , Lv Zheng , Hanjun Guo , Marc Zyngier , linux-ia64@vger.kernel.org, linux-acpi@vger.kernel.org, devel@acpica.org Cc: linux-kernel@vger.kernel.org, Robert Richter , David Daney Subject: [PATCH v5 02/14] acpi, numa: Replace ACPI_DEBUG_PRINT() with pr_debug() Date: Tue, 19 Apr 2016 18:40:27 -0700 Message-Id: <1461116439-22991-3-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1461116439-22991-1-git-send-email-ddaney.cavm@gmail.com> References: <1461116439-22991-1-git-send-email-ddaney.cavm@gmail.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hanjun Guo 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 Signed-off-by: Robert Richter Signed-off-by: David Daney --- 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 4e427fc..e34b5d0 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c @@ -31,10 +31,6 @@ #include #include -#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);