Re: [PATCH v3 2/3] powerpc/numa: Allow cpu_to_coregroup_id without PPC_SPLPAR

From: Srikar Dronamraju

Date: Fri Sep 04 2026 - 08:39:12 EST


* Shrikanth Hegde <sshegde@xxxxxxxxxxxxx> [2026-09-04 15:29:03]:

>
>
> On 9/2/26 6:05 PM, Srikar Dronamraju wrote:
> > Make cpu_to_coregroup_id() available outside PPC_SPLPAR so it can be
> > used by platforms that do not rely on the SPLPAR-specific VPHN path.
> >
> >
> > diff --git a/arch/powerpc/include/asm/topology.h b/arch/powerpc/include/asm/topology.h
> > index 44ec416fa489..02c3c9ab3ea9 100644
> > --- a/arch/powerpc/include/asm/topology.h
> > +++ b/arch/powerpc/include/asm/topology.h
> > @@ -71,6 +71,7 @@ extern void map_cpu_to_node(int cpu, int node);
> > extern void unmap_cpu_from_node(unsigned long cpu);
> > #endif /* CONFIG_HOTPLUG_CPU */
> > +int cpu_to_coregroup_id(int cpu);
>
> nit:
>
> I prefer extern before declaration so that i can see it is defined
> elsewhere.

Hey Shrikanth,

Thanks for taking a look.

It was done on intention based on comment from Christophe Leroy here
https://lkml.kernel.org/r/6387fb12-76f1-4503-8ac2-3ca777c0186e@xxxxxxxxxx

>
> Other than that, rest looks good to me.
>
> Reviewed-by: Shrikanth Hegde <sshegde@xxxxxxxxxxxxx>
>

--
Thanks and Regards
Srikar Dronamraju