From patchwork Wed Apr 27 18:07:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 8961281 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 CFB079F1C1 for ; Wed, 27 Apr 2016 18:11:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C0E8120225 for ; Wed, 27 Apr 2016 18:11:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3BA62015A for ; Wed, 27 Apr 2016 18:11:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752575AbcD0SLH (ORCPT ); Wed, 27 Apr 2016 14:11:07 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:34035 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752725AbcD0SHk (ORCPT ); Wed, 27 Apr 2016 14:07:40 -0400 Received: by mail-pa0-f68.google.com with SMTP id yl2so5678432pac.1; Wed, 27 Apr 2016 11:07:40 -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=O8dXMRuyianIe4664OHcu1WqeX7PFJSTdZcasyn8WRM=; b=SDQB+0JG3G0ys7EN9p3mjjrpaCrGE9DYUXwxXjcDzs13CPGyhZvOsl8CxBttkB5Rai YAQh1YPNsr7wWmAD6O7JAwAtukhRo/D+BTA1BUBmX8kMby529A1lfQxReSSZBV5kwjJE Liq+k6/NF+rKKc/peG3bUWZ/x2BwlZukJB75Qgo41ZNAKjGfT+EPuJp8U0hWWD/qUwuL nhDWN4L4Y8LCSTVRpFWKB4+c1KnFkCMRKn/+RJZ5OPUT/q8XITY2U7wZpuFvwNq2wGUe DbKfW5+mV8pt1FUlTgMUdYDgq9CIV43e524IclNcxjjsEeXYFVTtrR5dk04OgYUARhoB IOEg== 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=O8dXMRuyianIe4664OHcu1WqeX7PFJSTdZcasyn8WRM=; b=fSAuFUkP1bUrqRoVOnMcKXzRIsJ09VLEUH3UnRZVhRNK0Dc9m9AZJtKHKp/bk8i04q 1ILaZG7uNgTrsMOD3+7oLuRRd7RxVcsH/Ejs1Zy0KGpmVV95FGDq4zCXyey43K9/sDMw OkAQ3Yqc7pHHZjzkhnEsBtQRWblvROzyWCP8AaZQs/M4I4zgxrUtm95B+VB8IR4VTw/2 ZEQimc/KqxcADwM7h7C8PRGEecxK8SS6K82vSwIPW9/1JJaHqvOsmzqIPH7d2BK9ncxz m0R1ASpsj0Gvi70HlszC6cmqivPp9+bvneb19NQoZW2uINU9c3Q3ieFkKYvgKs38Df4J hSDw== X-Gm-Message-State: AOPr4FW/wHckRAWem8aP2pfzG8XNWoT5sNtOzdOImxKT2xFwordo080Uue4yWAf4QQRFVQ== X-Received: by 10.66.34.68 with SMTP id x4mr13969783pai.57.1461780459973; Wed, 27 Apr 2016 11:07:39 -0700 (PDT) Received: from dl.caveonetworks.com ([64.2.3.194]) by smtp.gmail.com with ESMTPSA id u63sm8257990pfu.18.2016.04.27.11.07.32 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 27 Apr 2016 11:07:34 -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 u3RI7V7g027259; Wed, 27 Apr 2016 11:07:31 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id u3RI7VbN027258; Wed, 27 Apr 2016 11:07:31 -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 v6 07/14] arm64, numa: Cleanup NUMA disabled messages. Date: Wed, 27 Apr 2016 11:07:09 -0700 Message-Id: <1461780436-27182-8-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1461780436-27182-1-git-send-email-ddaney.cavm@gmail.com> References: <1461780436-27182-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=ham 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: 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 --- 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; }