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: 9134403 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 E7616607D3 for ; Tue, 24 May 2016 22:40:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCA9F281E3 for ; Tue, 24 May 2016 22:40:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D135B2822B; Tue, 24 May 2016 22:40:18 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7F7E9281E3 for ; Tue, 24 May 2016 22:40:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5KxL-0007fX-1K; Tue, 24 May 2016 22:37:43 +0000 Received: from mail-pa0-x242.google.com ([2607:f8b0:400e:c03::242]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5Kw8-0006nf-Bc for linux-arm-kernel@lists.infradead.org; Tue, 24 May 2016 22:36:30 +0000 Received: by mail-pa0-x242.google.com with SMTP id fg1so3279523pad.3 for ; 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=ammBVZd25L1iqlN2VCXptZH17p/0IkA9qhvU7sqp3V/4gDgXd2fIDd0Hxh93uBmlyF iMQ88iEYU4uB4h7hs0P402wH3DGJ9p026/H/TkyRulyOILeMAEq1+PXtmDFBgv5yS3nx 94RrS/5zJEEEgaFUSoSiV492S+ea3rOzZcwx9y+c5Uc3BfN374OW2XvcaKSCUii9vbKD MZcXLLjFq46C4oEzwlgUdW1R4hGWIYLbkakNyq9VJXGiwQOdRACdR4ukM0TzSWV3BWo3 7miQ0hypaEJjUFWvays7qnUHtfVwK/t86nBD6TfR6a1rcHB9CBXKPWJnwVUO8tI4o0VL BX+Q== X-Gm-Message-State: ALyK8tIsPw6Ow16Fcqmx9urTkAH5jsq5x2SvxqQl5zGs/WOawzWVvCjscVKY8H5552QNrw== 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160524_153628_596632_DD73FF7C X-CRM114-Status: GOOD ( 15.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Robert Richter , linux-kernel@vger.kernel.org, David Daney MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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; }