linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Atish Patra <atish.patra@wdc.com>
To: linux-kernel@vger.kernel.org
Cc: Atish Patra <atish.patra@wdc.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Anup Patel <Anup.Patel@wdc.com>, Arnd Bergmann <arnd@arndb.de>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Greentime Hu <greentime.hu@sifive.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-arch@vger.kernel.org, linux-riscv@lists.infradead.org,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Mike Rapoport <rppt@kernel.org>, Nick Hu <nickhu@andestech.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Steven Price <steven.price@arm.com>,
	Will Deacon <will@kernel.org>, Zong Li <zong.li@sifive.com>,
	Ganapatrao Kulkarni <gkulkarni@cavium.com>,
	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	[thread overview]
Message-ID: <20200814214725.28818-4-atish.patra@wdc.com> (raw)
In-Reply-To: <20200814214725.28818-1-atish.patra@wdc.com>

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 <atish.patra@wdc.com>
---
 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 <linux/acpi.h>
 #include <linux/memblock.h>
 #include <linux/module.h>
+#include <linux/pci.h>
 #include <linux/of.h>
 
 #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


  parent reply	other threads:[~2020-08-14 21:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 21:47 [RFC/RFT PATCH 0/6] Unify NUMA implementation between ARM64 & RISC-V Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 1/6] numa: Move numa implementation to common code Atish Patra
2020-08-14 23:19   ` Randy Dunlap
2020-08-19  3:18   ` Anshuman Khandual
2020-08-19 19:18     ` Atish Patra
2020-08-20  3:20       ` Anshuman Khandual
2020-08-21 21:58         ` Atish Patra
2020-08-28  9:13           ` Jonathan Cameron
2020-08-28  9:22   ` Jonathan Cameron
2020-08-29  0:31     ` Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 2/6] arm64, numa: Change the numa init function name to be generic Atish Patra
2020-08-28  9:35   ` Jonathan Cameron
2020-08-29  0:39     ` Atish Patra
2020-08-14 21:47 ` Atish Patra [this message]
2020-08-28  9:48   ` [RFC/RFT PATCH 3/6] arm64, numa: Move pcibus_to_node definition to generic numa code Jonathan Cameron
2020-08-28 16:15     ` Bjorn Helgaas
2020-08-29  1:11       ` Atish Patra
2020-08-30  2:54         ` Bjorn Helgaas
2020-08-30  7:22           ` Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 4/6] riscv: Separate memory init from paging init Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 5/6] riscv: Add support pte_protnone and pmd_protnone if CONFIG_NUMA_BALANCING Atish Patra
2020-08-14 21:47 ` [RFC/RFT PATCH 6/6] riscv: Add numa support for riscv64 platform Atish Patra
2020-08-14 23:21   ` Randy Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200814214725.28818-4-atish.patra@wdc.com \
    --to=atish.patra@wdc.com \
    --cc=Anup.Patel@wdc.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=gkulkarni@cavium.com \
    --cc=greentime.hu@sifive.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=nickhu@andestech.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rppt@kernel.org \
    --cc=steven.price@arm.com \
    --cc=will@kernel.org \
    --cc=zong.li@sifive.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).