From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BFFBC2D0A3 for ; Fri, 6 Nov 2020 17:15:25 +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 8157622202 for ; Fri, 6 Nov 2020 17:15:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SD6YrJw8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8157622202 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZbxjE7VYJKsng3IJ/yc3fdd/+q9AMBJvSDPjVCqJM/8=; b=SD6YrJw8pJLumjPBHWZk+FlRM xHQOhfVM/szl19Msux4CWIbZgsXmNchnekjfdGMWIJuT5sYvLuPNrb1roos3f7D9SMUqI4rA3DLv0 B4Ra/lPsmrOGlKfSnaGh4BJGiOBRkwdarAu8ip3Bacp7TrOduzg6BQZS733V1S9RYARmvdpJcJgV1 wag08lTjo/EFunVWan5nIg9jvr8NL/heVSCUW2WEQ1v2Qnm+VkYA2NcWghPVHs++24yfB78piw7q/ xvoodGAK68cmk+tvGYkIOKhIFQs5UpiQqWMpmwTbWTEnM1ZlZ9juw624AnZWLcoFwn6W3CgH/NDrF i/8ch2U2g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb5JW-00064l-OY; Fri, 06 Nov 2020 17:14:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kb5JU-000646-IU; Fri, 06 Nov 2020 17:14:13 +0000 Received: from gaia (unknown [2.26.170.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5940722202; Fri, 6 Nov 2020 17:14:07 +0000 (UTC) Date: Fri, 6 Nov 2020 17:14:04 +0000 From: Catalin Marinas To: Atish Patra Subject: Re: [PATCH v4 2/5] arm64, numa: Change the numa init functions name to be generic Message-ID: <20201106171403.GK29329@gaia> References: <20201006001752.248564-1-atish.patra@wdc.com> <20201006001752.248564-3-atish.patra@wdc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201006001752.248564-3-atish.patra@wdc.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201106_121412_788753_6C349E0E X-CRM114-Status: GOOD ( 22.17 ) 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: Kefeng Wang , David Hildenbrand , Jonathan Cameron , Zong Li , linux-riscv@lists.infradead.org, Will Deacon , linux-arch@vger.kernel.org, Lorenzo Pieralisi , Jia He , Anup Patel , "Rafael J. Wysocki" , Steven Price , Greentime Hu , Albert Ou , Arnd Bergmann , Anshuman Khandual , Paul Walmsley , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Palmer Dabbelt , Mike Rapoport , Andrew Morton , Nicolas Saenz Julienne Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Oct 05, 2020 at 05:17:49PM -0700, Atish Patra wrote: > diff --git a/arch/arm64/kernel/acpi_numa.c b/arch/arm64/kernel/acpi_numa.c > index 7ff800045434..96502ff92af5 100644 > --- a/arch/arm64/kernel/acpi_numa.c > +++ b/arch/arm64/kernel/acpi_numa.c > @@ -117,16 +117,3 @@ void __init acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) > > node_set(node, numa_nodes_parsed); > } > - > -int __init arm64_acpi_numa_init(void) > -{ > - int ret; > - > - ret = acpi_numa_init(); > - if (ret) { > - pr_info("Failed to initialise from firmware\n"); > - return ret; > - } > - > - return srat_disabled() ? -EINVAL : 0; > -} I think it's better if arm64_acpi_numa_init() and arm64_numa_init() remained in the arm64 code. It's not really much code to be shared. > diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c > index 73f8b49d485c..74b4f2ddad70 100644 > --- a/drivers/base/arch_numa.c > +++ b/drivers/base/arch_numa.c > @@ -13,7 +13,6 @@ > #include > #include > > -#include > #include > > struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; > @@ -444,16 +443,37 @@ static int __init dummy_numa_init(void) > return 0; > } > > +#ifdef CONFIG_ACPI_NUMA > +static int __init arch_acpi_numa_init(void) > +{ > + int ret; > + > + ret = acpi_numa_init(); > + if (ret) { > + pr_info("Failed to initialise from firmware\n"); > + return ret; > + } > + > + return srat_disabled() ? -EINVAL : 0; > +} > +#else > +static int __init arch_acpi_numa_init(void) > +{ > + return -EOPNOTSUPP; > +} > + > +#endif > + > /** > - * 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. > + * last fallback is dummy single node config encompassing whole memory. > */ > -void __init arm64_numa_init(void) > +void __init arch_numa_init(void) > { > if (!numa_off) { > - if (!acpi_disabled && !numa_init(arm64_acpi_numa_init)) > + if (!acpi_disabled && !numa_init(arch_acpi_numa_init)) > return; > if (acpi_disabled && !numa_init(of_numa_init)) > return; Does riscv even have an acpi_disabled variable? -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel