Hi Julien,

> -----Original Message-----
> From: Julien Grall <[email protected]>
> Sent: 2021年8月27日 22:19
> To: Wei Chen <[email protected]>; [email protected];
> [email protected]; [email protected]
> Cc: Bertrand Marquis <[email protected]>
> Subject: Re: [XEN RFC PATCH 35/40] xen: enable numa_scan_nodes for device
> tree based NUMA
> 
> Hi Wei,
> 
> On 11/08/2021 11:24, Wei Chen wrote:
> > Now, we can use the same function for ACPI and device tree based
> > NUMA to scan memory nodes.
> >
> > Signed-off-by: Wei Chen <[email protected]>
> > ---
> >   xen/common/numa.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/xen/common/numa.c b/xen/common/numa.c
> > index 8ca13e27d1..d15c2fc311 100644
> > --- a/xen/common/numa.c
> > +++ b/xen/common/numa.c
> > @@ -381,7 +381,7 @@ void __init numa_initmem_init(unsigned long
> start_pfn, unsigned long end_pfn)
> >           return;
> >   #endif
> >
> > -#ifdef CONFIG_ACPI_NUMA
> > +#if defined(CONFIG_ACPI_NUMA) || defined(CONFIG_DEVICE_TREE_NUMA)
> 
> numa.c is only built when CONFIG_NUMA is set. I don't think CONFIG_NUMA
> will ever set if neither CONFIG_ACPI_NUMA or CONFIG_DEVICE_TREE_NUMA is
> set. So do we actually need this #ifdef?
> 

Yes, you're right. This check should be removed.


> >       if ( !numa_off && !numa_scan_nodes((u64)start_pfn << PAGE_SHIFT,
> >            (u64)end_pfn << PAGE_SHIFT) )
> >           return;
> >
> 
> Cheers,
> 
> --
> Julien Grall

Reply via email to