mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	 Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	 Huacai Chen <chenhuacai@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	 linux-mips@vger.kernel.org,
	Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: [PATCH 1/7] arch_numa: Provide platform numa init hook
Date: Fri, 09 Aug 2024 20:25:01 +0100	[thread overview]
Message-ID: <20240809-mips-numa-v1-1-568751803bf8@flygoat.com> (raw)
In-Reply-To: <20240809-mips-numa-v1-0-568751803bf8@flygoat.com>

For some pre-devicetree systems, NUMA information may come from
platform specific way.

Provide platform numa init hook to allow platform code kick in
as last resort method to supply NUMA configuration.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 drivers/base/arch_numa.c   | 7 +++++++
 include/asm-generic/numa.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/base/arch_numa.c b/drivers/base/arch_numa.c
index 8d49893c0e94..d464baeee69a 100644
--- a/drivers/base/arch_numa.c
+++ b/drivers/base/arch_numa.c
@@ -305,6 +305,11 @@ static int __init arch_acpi_numa_init(void)
 }
 #endif
 
+int __init __weak arch_platform_numa_init(void)
+{
+	return -EOPNOTSUPP;
+}
+
 /**
  * arch_numa_init() - Initialize NUMA
  *
@@ -318,6 +323,8 @@ void __init arch_numa_init(void)
 			return;
 		if (acpi_disabled && !numa_init(of_numa_init))
 			return;
+		if (!numa_init(arch_platform_numa_init))
+			return;
 	}
 
 	numa_init(dummy_numa_init);
diff --git a/include/asm-generic/numa.h b/include/asm-generic/numa.h
index c2b046d1fd82..53a8210fde00 100644
--- a/include/asm-generic/numa.h
+++ b/include/asm-generic/numa.h
@@ -31,6 +31,7 @@ static inline const struct cpumask *cpumask_of_node(int node)
 #endif
 
 void __init arch_numa_init(void);
+int __init arch_platform_numa_init(void);
 int __init numa_add_memblk(int nodeid, u64 start, u64 end);
 void __init early_map_cpu_to_node(unsigned int cpu, int nid);
 int __init early_cpu_to_node(int cpu);

-- 
2.46.0


  reply	other threads:[~2024-08-09 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09 19:25 [PATCH 0/7] MIPS: arch_numa enablement Jiaxun Yang
2024-08-09 19:25 ` Jiaxun Yang [this message]
2024-08-09 19:41   ` [PATCH 1/7] arch_numa: Provide platform numa init hook Arnd Bergmann
2024-08-09 19:56     ` Jiaxun Yang
2024-08-09 20:01       ` Arnd Bergmann
2024-08-09 19:25 ` [PATCH 2/7] MIPS: pci: Unify pcibus_to_node implementation Jiaxun Yang
2024-08-09 19:25 ` [PATCH 3/7] MIPS: Prepare NUMA headers for arch_numa Jiaxun Yang
2024-08-09 19:25 ` [PATCH 4/7] MIPS: mm: init: Prepare " Jiaxun Yang
2024-08-09 19:25 ` [PATCH 5/7] MIPS: smp: Process NUMA information Jiaxun Yang
2024-08-09 19:25 ` [PATCH 6/7] MIPS: generic: Make NUMA available Jiaxun Yang
2024-08-09 19:25 ` [PATCH 7/7] MIPS: Loongson64: Migrate to arch_numa Jiaxun Yang

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=20240809-mips-numa-v1-1-568751803bf8@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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

all inboxes | Powered by JetHome®