From: Saurabh Singh Sengar <ssengar@microsoft.com>
To: Saurabh Sengar <ssengar@linux.microsoft.com>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"bp@alien8.de" <bp@alien8.de>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"x86@kernel.org" <x86@kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>,
"luto@kernel.org" <luto@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"Michael Kelley (LINUX)" <mikelley@microsoft.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Sharath George John <sgeorgejohn@microsoft.com>
Subject: RE: [PATCH] x86/numa: Add Devicetree support
Date: Wed, 12 Jul 2023 08:11:32 +0000 [thread overview]
Message-ID: <PUZP153MB07491ED0C0688FF9104F72CDBE36A@PUZP153MB0749.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <1687850882-22554-1-git-send-email-ssengar@linux.microsoft.com>
> -----Original Message-----
> From: Saurabh Sengar <ssengar@linux.microsoft.com>
> Sent: Tuesday, June 27, 2023 12:58 PM
> To: tglx@linutronix.de; mingo@redhat.com; bp@alien8.de;
> dave.hansen@linux.intel.com; x86@kernel.org; hpa@zytor.com;
> luto@kernel.org; peterz@infradead.org; Michael Kelley (LINUX)
> <mikelley@microsoft.com>; linux-kernel@vger.kernel.org
> Cc: ssengar@linux.microsoft.com
> Subject: [PATCH] x86/numa: Add Devicetree support
>
> Hyper-V has usecases where it need to fetch NUMA information from
> Devicetree. Currently, it is not possible to extract the NUMA
> information from Devicetree for x86 arch.
>
> Add support for Devicetree in the x86_numa_init function, allowing
> the retrieval of NUMA node information from the Devicetree.
>
> Additionally, relocate the x86_dtb_init function before initmem_init
> to ensure the Devicetree initialization prior to its utilization in
> x86_numa_init.
>
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> ---
> arch/x86/Kconfig | 1 +
> arch/x86/kernel/setup.c | 2 +-
> arch/x86/mm/numa.c | 3 +++
> 3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index c531b16ee0bf..a2ada193b2d8 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1567,6 +1567,7 @@ config NUMA
> depends on X86_64 || (X86_32 && HIGHMEM64G && X86_BIGSMP)
> default y if X86_BIGSMP
> select USE_PERCPU_NUMA_NODE_ID
> + select OF_NUMA if OF
> help
> Enable NUMA (Non-Uniform Memory Access) support.
>
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index fd975a4a5200..940c92a6a5e9 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -1220,6 +1220,7 @@ void __init setup_arch(char **cmdline_p)
>
> early_acpi_boot_init();
>
> + x86_dtb_init();
> initmem_init();
> dma_contiguous_reserve(max_pfn_mapped << PAGE_SHIFT);
>
> @@ -1261,7 +1262,6 @@ void __init setup_arch(char **cmdline_p)
> * Read APIC and some other early information from ACPI tables.
> */
> acpi_boot_init();
> - x86_dtb_init();
>
> /*
> * get boot-time SMP configuration:
> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> index 2aadb2019b4f..a6d3d331fda2 100644
> --- a/arch/x86/mm/numa.c
> +++ b/arch/x86/mm/numa.c
> @@ -11,6 +11,7 @@
> #include <linux/nodemask.h>
> #include <linux/sched.h>
> #include <linux/topology.h>
> +#include <linux/of.h>
>
> #include <asm/e820/api.h>
> #include <asm/proto.h>
> @@ -733,6 +734,8 @@ void __init x86_numa_init(void)
> if (!numa_init(amd_numa_init))
> return;
> #endif
> + if (acpi_disabled && !numa_init(of_numa_init))
> + return;
> }
>
> numa_init(dummy_numa_init);
> --
> 2.34.1
Hi x86 Maintainers,
May I get your feedback on this patch.
Regards,
Saurabh
next prev parent reply other threads:[~2023-07-12 8:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-27 7:28 Saurabh Sengar
2023-07-12 8:11 ` Saurabh Singh Sengar [this message]
2023-07-27 8:06 ` Saurabh Singh Sengar
2023-08-02 18:49 ` Michael Kelley (LINUX)
2023-08-11 10:29 ` Saurabh Singh Sengar
2023-08-24 5:16 ` Saurabh Singh Sengar
2023-08-24 15:28 ` Thomas Gleixner
2023-08-24 15:59 ` Saurabh Singh Sengar
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=PUZP153MB07491ED0C0688FF9104F72CDBE36A@PUZP153MB0749.APCP153.PROD.OUTLOOK.COM \
--to=ssengar@microsoft.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mikelley@microsoft.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sgeorgejohn@microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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®