From patchwork Tue May 24 22:35:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 9134395 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D2006607D8 for ; Tue, 24 May 2016 22:39:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C7E0B281E3 for ; Tue, 24 May 2016 22:39:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCBEE2822B; Tue, 24 May 2016 22:39:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5DF1F281F9 for ; Tue, 24 May 2016 22:39:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759AbcEXWjl (ORCPT ); Tue, 24 May 2016 18:39:41 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:35189 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752835AbcEXWgI (ORCPT ); Tue, 24 May 2016 18:36:08 -0400 Received: by mail-pa0-f66.google.com with SMTP id gp3so3274668pac.2; Tue, 24 May 2016 15:36:08 -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=DqA+1oZ7F1+A/+j5dymqY8YwqfvcPd9hgo9pJ5+DC84=; b=s7RMDWBhOMiI1qKOikoUGXXqVzUlb/uqxO5uPks/a7032qJl0oULewBP70pEzANzXc Ibf3FMm01+CveHCuC7vNKMnfc5uLa67BPflmOxbe/jkmNDRXZYqXo6zTIfwNZsxx+EuT tECUsAjixNJzD4khRdy5fkEIcLhaEeCZLtu+PzhuqKRDueRJgoqFRxbNaP5gyI4tUol2 8/tgeOhOqdIotetlgUvage0x0Qs0StXYaOTes9Rd28dqRl7XZOikhi5gn4NK9nIhx/6n a2YQZRNf9ho6o6p4C6Jb9sfex2wCX583ZBOhtKsxmsJef79jMI1QrgaD9njFHbv4QPIG vyCA== 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=DqA+1oZ7F1+A/+j5dymqY8YwqfvcPd9hgo9pJ5+DC84=; b=HghaZJVHQ9Ktg7jsj34Pv97InDQhYbr1CAGoZU2C5pfOGaFpatRg7IGVhLzvucjU3v cFrHu10C+4iq25keA26sMsRTivTspOB7ty33dUhQ3q0BqfQOyFxsPQF28z0RuZ5COhyD iK2mvULCOSmdPkey8XuZ99dUtTyMpKP8U9ANoQYQPzNzalxUi4JI7vaA/JPbFCPJlJH6 zZUOawPWbZuKqnAN4joJynjD1CS+1yjvNjaHd0WXG0rT7Ab5tkdXD4hEtgvNM1vkL8Sv caIoocJiiO9mRg2jXbUnzbJAVaG0CpSQslS6Aj2G8VGEokMtNvGp7HMSoC01/pm9Rup+ LyrQ== X-Gm-Message-State: ALyK8tJjkQbHxFiomIcTa+b8bJMgQfuqXOb6V8YiTKNPZ4dx07u+H/YUHr0iHGk26q+m/Q== X-Received: by 10.66.241.73 with SMTP id wg9mr806339pac.91.1464129367588; Tue, 24 May 2016 15:36:07 -0700 (PDT) Received: from dl.caveonetworks.com ([50.233.148.158]) by smtp.gmail.com with ESMTPSA id q20sm56646480pfa.90.2016.05.24.15.36.01 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 24 May 2016 15:36:02 -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 u4OMa0wB019063; Tue, 24 May 2016 15:36:00 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id u4OMa0O8019062; Tue, 24 May 2016 15:36:00 -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 v7 07/15] arm64, numa: Cleanup NUMA disabled messages. Date: Tue, 24 May 2016 15:35:37 -0700 Message-Id: <1464129345-18985-8-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1464129345-18985-1-git-send-email-ddaney.cavm@gmail.com> References: <1464129345-18985-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-Virus-Scanned: ClamAV using ClamSMTP From: David Daney As noted by Dennis Chen, we don't want to print "No NUMA configuration found" if NUMA was forced off from the command line. Change the type of numa_off to bool, and clean up printing code. Print "NUMA disabled" if forced off on command line and "No NUMA configuration found" if there was no firmware NUMA information. Signed-off-by: David Daney Acked-by: Catalin Marinas Reviewed-by: Dennis Chen Reviewed-by: Hanjun Guo --- arch/arm64/mm/numa.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c index 6cb03f9..1def1de 100644 --- a/arch/arm64/mm/numa.c +++ b/arch/arm64/mm/numa.c @@ -29,7 +29,7 @@ static int cpu_to_node_map[NR_CPUS] = { [0 ... NR_CPUS-1] = NUMA_NO_NODE }; static int numa_distance_cnt; static u8 *numa_distance; -static int numa_off; +static bool numa_off; static __init int numa_parse_early_param(char *opt) { @@ -37,7 +37,7 @@ static __init int numa_parse_early_param(char *opt) return -EINVAL; if (!strncmp(opt, "off", 3)) { pr_info("%s\n", "NUMA turned off"); - numa_off = 1; + numa_off = true; } return 0; } @@ -362,7 +362,10 @@ static int __init dummy_numa_init(void) int ret; struct memblock_region *mblk; - pr_info("%s\n", "No NUMA configuration found"); + if (numa_off) + pr_info("NUMA disabled\n"); /* Forced off on command line. */ + else + pr_info("No NUMA configuration found\n"); pr_info("NUMA: Faking a node at [mem %#018Lx-%#018Lx]\n", 0LLU, PFN_PHYS(max_pfn) - 1); @@ -375,7 +378,7 @@ static int __init dummy_numa_init(void) return ret; } - numa_off = 1; + numa_off = true; return 0; }