Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp689658pxa; Fri, 14 Aug 2020 15:26:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxwGT2rQFce2Db1/KiVWEc+Z+SaWO6Ha2fBaGfnEl80MPynpt5ckd6nQ57bB6j9NLptbbl X-Received: by 2002:a17:906:a399:: with SMTP id k25mr4763522ejz.467.1597443983380; Fri, 14 Aug 2020 15:26:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597443983; cv=none; d=google.com; s=arc-20160816; b=BbCZhaKrp0p2Y3zoHV2LxT73ICTTs4MNyuTjmey6U1zHeW/h62DFzf+S01WyZuBbBH 3icOqQJ7chF+k81TALSj1/AmbRknNVwNmCs1qIpzQj+ufB0wqQPicGVKonxLH6PsIKHa w2kiJYD+C2zfS3Am2I9rJsn+bIWw6PwbSwfA7zyaLMah15oCwHO6wdOWvExyWwU/Fp2E sNwpS83UWgYR/oG1FkkPq1Rk04k690L3MxuSLWMDgKSRXdsozhTO9Q+Pw8N9/kkUCMW8 OjftVHt9ATcGXA5TEehUr4fL8oP/LR673H8Xkxuq9N3HtL5VTJdWGrWdkr2o6Co2leaQ 6vJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :wdcironportexception:ironport-sdr:ironport-sdr:ironport-sdr :dkim-signature; bh=RFJ3MGgew8Ew75Ay9IrWfdhSuRBScNcktggSIDq4PBg=; b=fOts4LKi5x7XN6aG0QQlr+w3IBFWLSnaRcFJ6BWqTAvyKNEUzEtFPngFqaneaL7NqD IQsuoZcZFLEu/EluRtW8SL3rgvq66D+3QJsq9d4xukwNzAjS7E226eWRNqUW5Z9QnWT4 gKeMRud03XUGuTT3gKOCu/h4AfA0+J3BW2UP1lzSR9XAXxnBQX7IeBCuXSOi0djSItVK YI0tf0MGp1d077T7jA9VLVKtYv+tUX79ODEBf07yK0nfTEuRneLY+HJhhPfZKqrsi2l/ txy7U6GYcq2kpyaO8w3nn7g5de56mv93QqITSedS22rnZhjU+IrCGN9gXoZ2Wp4akwjz j/3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=dYHzppwK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lt22si5987561ejb.376.2020.08.14.15.26.00; Fri, 14 Aug 2020 15:26:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=dYHzppwK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728523AbgHNVsf (ORCPT + 99 others); Fri, 14 Aug 2020 17:48:35 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:25018 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbgHNVsd (ORCPT ); Fri, 14 Aug 2020 17:48:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1597441713; x=1628977713; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0l8UMU0Nf80nnOcPq6fS4BA8LVPERcrIfgcS5BiLKhg=; b=dYHzppwKZRNTqari1W/+UMbO1/OuYaJ5tqoDuJlAlNhGU+ivBs6Lx1E3 gj5/6jmerslw6dx1BQeOSLaPoZwFSG24rraiDo8WwANP+f08mUYrgilOr I1LW707eXGiRzYX39GKQX/Js7eqlxUAe/poaJy3Ogaqf3qoin9Qw9YbV4 k24ktGJtypItrvhYx5zEt76ltXGbVWv/pTNneeeYwp6XbsMAVkn7PrghT ieOdp7PxtD+T97DJQFeo9LcXtmxngvd3aii7C2Df0uVksO4Wre+kpCoPG d60jt0TYgLYA/PVhibwXKuiOZaSU5Z1IfXzVMtdLPW5oIgYDl+6hm1//8 Q==; IronPort-SDR: VwYyg6F1ke1Py5joIZ+lZDC5Y2pDV90V3saqeMvOvHBO4lF11omuG7WKZt3Yr/np+r3HcNqCUd D/ZYxrBwXAWE0vORUGhcm6VgTrttfP3el03PuLX1F3WUACFAhb9LYQMAE1Y0BE1QOP9QO1Iynj hkvMgPoBCIfxOWoTEZXquFqiuvGFppH9qSm2tldXEep6lqYxgs5jPm1GZBOvBCiVayIP5Uq38p FazsOmhjkH83DLJOCLKuma6IEVU4MdEgQlHHvZkCsp2PqFvH8r471HhsVAHuVfOGredPsIVRRU Ct8= X-IronPort-AV: E=Sophos;i="5.76,313,1592841600"; d="scan'208";a="146217649" 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:31 +0800 IronPort-SDR: qpMXf9ctH+Z+c+fDGINFi55bB0pVWl41a3DJ4yGioPw0WYslR0uBVXF8QhVq6c+2XZMI0FL+zU 8ot+CJW2r57Q== 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:36 -0700 IronPort-SDR: GdemDOqwgj4kCAjq3L57gKGOb0BWT3gQzwEH1J+zYbKEVIRvsWAvkgfPVY9GgvZMY4uY0At5b4 uSyUDwfD8Rkg== 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:29 -0700 From: Atish Patra To: linux-kernel@vger.kernel.org Cc: Atish Patra , Albert Ou , Andrew Morton , Anshuman Khandual , Anup Patel , Arnd Bergmann , Catalin Marinas , Greentime Hu , Greg Kroah-Hartman , linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org, Lorenzo Pieralisi , Mike Rapoport , Nick Hu , Palmer Dabbelt , Paul Walmsley , "Rafael J. Wysocki" , Rob Herring , Steven Price , Will Deacon , Zong Li , Ganapatrao Kulkarni , linux-arm-kernel@lists.infradead.org Subject: [RFC/RFT PATCH 3/6] arm64, numa: Move pcibus_to_node definition to generic numa code Date: Fri, 14 Aug 2020 14:47:22 -0700 Message-Id: <20200814214725.28818-4-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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org pcibus_to_node is used only when numa is enabled and does not depend on ISA. Thus, it can be moved the generic numa implementation. Signed-off-by: Atish Patra --- arch/arm64/kernel/pci.c | 10 ---------- drivers/base/arch_numa.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 1006ed2d7c60..07c122946c11 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -54,16 +54,6 @@ int raw_pci_write(unsigned int domain, unsigned int bus, return b->ops->write(b, devfn, reg, len, val); } -#ifdef CONFIG_NUMA - -int pcibus_to_node(struct pci_bus *bus) -{ - return dev_to_node(&bus->dev); -} -EXPORT_SYMBOL(pcibus_to_node); - -#endif - #ifdef CONFIG_ACPI struct acpi_pci_generic_root_info { diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c index 83341c807240..4ab1b20a615d 100644 --- a/drivers/base/arch_numa.c +++ b/drivers/base/arch_numa.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #ifdef CONFIG_ARM64 @@ -60,6 +61,16 @@ EXPORT_SYMBOL(cpumask_of_node); #endif +#ifdef CONFIG_PCI + +int pcibus_to_node(struct pci_bus *bus) +{ + return dev_to_node(&bus->dev); +} +EXPORT_SYMBOL(pcibus_to_node); + +#endif + static void numa_update_cpu(unsigned int cpu, bool remove) { int nid = cpu_to_node(cpu); -- 2.24.0