Re: [PATCH] x86/numa: Add Devicetree support

From: Saurabh Singh Sengar
Date: Thu Aug 24 2023 - 12:00:04 EST


On Thu, Aug 24, 2023 at 05:28:37PM +0200, Thomas Gleixner wrote:
> On Tue, Jun 27 2023 at 00:28, Saurabh Sengar wrote:
> > 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.
>
> Moving dtb_init() is not really a good idea. The APIC/IO-APIC
> enumeration is post initmem_init() on purpose and the ongoing rework of
> the topology evaluation relies on that.
>
> What you really want is to split dtb_init() into two parts:
>
> 1) x86_flattree_get_config() which can be invoked before initmem init
> like ACPI has an early init part so SRAT parsing can be done in
> the numa initialization.
>
> 2) The APIC/IOAPIC registration part, which stays where it is.
>
> This split wants to be a seperate change.

Thanks for the review, I will send the v2 with suggested modifications.

- Saurabh

>
> Thanks,
>
> tglx
>
>
>
>