From patchwork Fri Aug 14 21:47:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Atish Patra X-Patchwork-Id: 11715205 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F2EE8618 for ; Fri, 14 Aug 2020 21:48:57 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C7AEB20716 for ; Fri, 14 Aug 2020 21:48:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mRIfbv5j"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="jSRwSQr6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C7AEB20716 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mbmkBvrJ1yOyZX62kYiCtic8ScTLotSgu97vrCT/2Uw=; b=mRIfbv5jUwNIwtvUHtbk3SNlh pdEKZPHRNGRVu1JP/i6hBBGIcNfpkkyozy2247UCY1l/1jopaGYVcJl9PAyz1TXF4ZOEkd4OYbTfe 79Y9UGA8/5YVL5fRi9F6H58Lk79PXvw9puBGyv8pi28XMg4/43Cgefn73moECIMMP2IiIyVmhgeld 6JDqfY5kZbwQTU4kwcLl+87tiTTn/RjL+JTId7wpb9o6bjj0LyIsLQsAyOU6GN8fQxXoLrWq1vEQT jyxU5jWMWlzcASDiyd1DS9pcukBy9I/d5cf7N3rkQk5sCkDdGHmGYGSZPkQ6Pj3tFpxgONtzAjfHZ x5O2ar64Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6hZ6-0008NK-E1; Fri, 14 Aug 2020 21:48:45 +0000 Received: from esa1.hgst.iphmx.com ([68.232.141.245]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k6hYu-0008Im-IC; Fri, 14 Aug 2020 21:48:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1597441712; x=1628977712; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=m0ccOUy/zHhyg/Evs7xmin4JSbqfjO8+1dBWk5YQiwo=; b=jSRwSQr64jdaqiC3Ynhre5kBxzIlz3K/hlcjCrpyBUwkNcuSq8dv18O5 nEd2tHOLWKxCGwiF8Aj3OwzeiMWYIpaWBb65H7nWVMFQTHbb5LQ9Rb1rk 5Nmm1Cn1uUMFdCfbYfvrANJ6rgNxz9v74/L4di7aETO8LOrBKyhr4rmbl /JIaVPgjXLrQC3fCA6y1z8UqG06E5Zt4x3gW5eh1HeqhCjfecQQbpzBN/ x/aPdMwpIHt+QsDEb00cTbyTx1qvy8WLpLyYYHQ3s+xACj9Y3vz4Xy6Ss gmZ6DjDgAM705xHq1oMg/Vtqm01HUuPLZ7KqsBHaukLonQQmzZYAuynXA g==; IronPort-SDR: BtPbD4b9df59uMKe/DfULewHf42AryRy39fAPBOqXzsjRPnESqVmAQP1ngcRjIDRICwvRS5dIz 7Q6hAz7SxM+bMDuZfHejuU0M0vVLTXXkaCEN5q8EiMoDvu+cOikP4TdW824Y/1h60cMiidmrLk dvQVe/X9m9difa1zLpE+nOojSz0EtS8i+ybwwJmr9j1GQDoqRgiCEcV3/Jzj/FeFtzu4xs6WCh ICr0O7b4d6am/xqE2Gn5uIEpJoBdkeRuX8x4Ps9Rym6jg2kS01HHNiQvKT8s5wxq4zbLDlvsdh 1RM= X-IronPort-AV: E=Sophos;i="5.76,313,1592841600"; d="scan'208";a="254397127" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Aug 2020 05:48:29 +0800 IronPort-SDR: eS2zB4tpOaaq/YuC9cGDWd8cgstBrVgLL8lnbgQvK/mHmLT5qUtRpdMG1bR6wdNwpJazKyZO7q REBbKVceSlyg== Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 14:35:35 -0700 IronPort-SDR: 2DVjtT6pQ6aK8cobzGLIr5QvsxKqDYZY5QAG/Ddtcd0GZ8GIwoCQOm4wZ3qrCTJjgmFEssxSQT 4a2SYWxH1DIg== WDCIronportException: Internal Received: from cnf006060.ad.shared (HELO jedi-01.hgst.com) ([10.86.59.56]) by uls-op-cesaip01.wdc.com with ESMTP; 14 Aug 2020 14:48:28 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Subject: [RFC/RFT PATCH 2/6] arm64, numa: Change the numa init function name to be generic Date: Fri, 14 Aug 2020 14:47:21 -0700 Message-Id: <20200814214725.28818-3-atish.patra@wdc.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20200814214725.28818-1-atish.patra@wdc.com> References: <20200814214725.28818-1-atish.patra@wdc.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200814_174832_778953_41543480 X-CRM114-Status: GOOD ( 16.80 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.141.245 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Rafael J. Wysocki" , Catalin Marinas , Atish Patra , Zong Li , linux-riscv@lists.infradead.org, Will Deacon , linux-arch@vger.kernel.org, Rob Herring , Lorenzo Pieralisi , Ganapatrao Kulkarni , Steven Price , Greentime Hu , Albert Ou , Arnd Bergmann , Anshuman Khandual , Paul Walmsley , linux-arm-kernel@lists.infradead.org, Nick Hu , Greg Kroah-Hartman , Anup Patel , Palmer Dabbelt , Andrew Morton , Mike Rapoport Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org As we are using generic numa implementation code, modify the init function name to indicate that generic implementation. Signed-off-by: Atish Patra --- arch/arm64/mm/init.c | 4 ++-- drivers/base/arch_numa.c | 8 ++++++-- include/asm-generic/numa.h | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c index 481d22c32a2e..93b660229e1d 100644 --- a/arch/arm64/mm/init.c +++ b/arch/arm64/mm/init.c @@ -418,10 +418,10 @@ void __init bootmem_init(void) max_pfn = max_low_pfn = max; min_low_pfn = min; - arm64_numa_init(); + arch_numa_init(); /* - * must be done after arm64_numa_init() which calls numa_init() to + * must be done after arch_numa_init() which calls numa_init() to * initialize node_online_map that gets used in hugetlb_cma_reserve() * while allocating required CMA size across online nodes. */ diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c index 73f8b49d485c..83341c807240 100644 --- a/drivers/base/arch_numa.c +++ b/drivers/base/arch_numa.c @@ -13,7 +13,9 @@ #include #include +#ifdef CONFIG_ARM64 #include +#endif #include struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; @@ -445,16 +447,18 @@ static int __init dummy_numa_init(void) } /** - * arm64_numa_init() - Initialize NUMA + * arch_numa_init() - Initialize NUMA * * Try each configured NUMA initialization method until one succeeds. The * last fallback is dummy single node config encomapssing whole memory. */ -void __init arm64_numa_init(void) +void __init arch_numa_init(void) { if (!numa_off) { +#ifdef CONFIG_ARM64 if (!acpi_disabled && !numa_init(arm64_acpi_numa_init)) return; +#endif if (acpi_disabled && !numa_init(of_numa_init)) return; } diff --git a/include/asm-generic/numa.h b/include/asm-generic/numa.h index 0635c0724b7c..309eca8c0b5d 100644 --- a/include/asm-generic/numa.h +++ b/include/asm-generic/numa.h @@ -27,7 +27,7 @@ static inline const struct cpumask *cpumask_of_node(int node) } #endif -void __init arm64_numa_init(void); +void __init arch_numa_init(void); int __init numa_add_memblk(int nodeid, u64 start, u64 end); void __init numa_set_distance(int from, int to, int distance); void __init numa_free_distance(void); @@ -41,7 +41,7 @@ void numa_remove_cpu(unsigned int cpu); static inline void numa_store_cpu_info(unsigned int cpu) { } static inline void numa_add_cpu(unsigned int cpu) { } static inline void numa_remove_cpu(unsigned int cpu) { } -static inline void arm64_numa_init(void) { } +static inline void arch_numa_init(void) { } static inline void early_map_cpu_to_node(unsigned int cpu, int nid) { } #endif /* CONFIG_NUMA */