[PATCH 1/3] powerpc: export cpu_to_core_id()

Michael Ellerman mpe at ellerman.id.au
Thu Jun 2 21:03:13 AEST 2016


On Thu, 2016-06-02 at 06:00 -0300, Mauricio Faria de Oliveira wrote:
> Hi Michael,
> On 06/02/2016 04:41 AM, Michael Ellerman wrote:
> > On Wed, 2016-06-01 at 17:16 -0300, Mauricio Faria de Oliveira wrote:

> > > Export cpu_to_core_id().  This will be used by the lpfc driver.
> > 
> > Can you explain why?
> 
> Yup,

> > I would have thought there'd be architecture neutral APIs you can use - and if
> > there aren't maybe we should write them.
> 
> I actually use topology_core_id() from  <kernel/topology.h> in lpfc [1]
> (defined to cpu_to_core_id() by arch/powerpc/include/asm/topology.h).
> 
> That is arch-neutral, used by eg /sys/devices/system/cpu/cpu*/topology,
> but drivers/base/topology.c is built-in (obj-y in ./Makefile), and thus
> didn't need the export.
> 
> Thus, since the module uses topology_core_id() and this is defined to
> cpu_to_core_id(), it needs the export:
> 
>      ERROR: "cpu_to_core_id" [drivers/scsi/lpfc/lpfc.ko] undefined!
>      make[1]: *** [__modpost] Error 1
>      make: *** [modules] Error 2

Thanks.

Can you send me a v2 with a change log that includes all that detail.

cheers



More information about the Linuxppc-dev mailing list