All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] powerpc: export cpu_to_core_id()
@ 2016-06-01 20:16 Mauricio Faria de Oliveira
  2016-06-01 20:19 ` Mauricio Faria de Oliveira
  2016-06-02  7:41 ` Michael Ellerman
  0 siblings, 2 replies; 7+ messages in thread
From: Mauricio Faria de Oliveira @ 2016-06-01 20:16 UTC (permalink / raw)
  To: linuxppc-dev

Export cpu_to_core_id().  This will be used by the lpfc driver.

Tested on next-20160601.

Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
---
 arch/powerpc/kernel/smp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 55c924b..67136e7 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -593,6 +593,7 @@ out:
 	of_node_put(np);
 	return id;
 }
+EXPORT_SYMBOL_GPL(cpu_to_core_id);
 
 /* Helper routines for cpu to core mapping */
 int cpu_core_index_of_thread(int cpu)
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] powerpc: export cpu_to_core_id()
  2016-06-01 20:16 [PATCH 1/3] powerpc: export cpu_to_core_id() Mauricio Faria de Oliveira
@ 2016-06-01 20:19 ` Mauricio Faria de Oliveira
  2016-06-02  7:41 ` Michael Ellerman
  1 sibling, 0 replies; 7+ messages in thread
From: Mauricio Faria de Oliveira @ 2016-06-01 20:19 UTC (permalink / raw)
  To: linuxppc-dev

Please ignore the 'PATCH 1/3' in the subject; this is a single patch.


-- 
Mauricio Faria de Oliveira
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] powerpc: export cpu_to_core_id()
  2016-06-01 20:16 [PATCH 1/3] powerpc: export cpu_to_core_id() Mauricio Faria de Oliveira
  2016-06-01 20:19 ` Mauricio Faria de Oliveira
@ 2016-06-02  7:41 ` Michael Ellerman
  2016-06-02  9:00   ` Mauricio Faria de Oliveira
       [not found]   ` <201606020900.u528tQHH025445@mx0a-001b2d01.pphosted.com>
  1 sibling, 2 replies; 7+ messages in thread
From: Michael Ellerman @ 2016-06-02  7:41 UTC (permalink / raw)
  To: Mauricio Faria de Oliveira, linuxppc-dev

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?

I would have thought there'd be architecture neutral APIs you can use - and if
there aren't maybe we should write them.

cheers

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] powerpc: export cpu_to_core_id()
  2016-06-02  7:41 ` Michael Ellerman
@ 2016-06-02  9:00   ` Mauricio Faria de Oliveira
  2016-06-02  9:05     ` Mauricio Faria de Oliveira
       [not found]   ` <201606020900.u528tQHH025445@mx0a-001b2d01.pphosted.com>
  1 sibling, 1 reply; 7+ messages in thread
From: Mauricio Faria de Oliveira @ 2016-06-02  9:00 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

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,

[1] http://marc.info/?l=linux-scsi&m=146481382301686

-- 
Mauricio Faria de Oliveira
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] powerpc: export cpu_to_core_id()
  2016-06-02  9:00   ` Mauricio Faria de Oliveira
@ 2016-06-02  9:05     ` Mauricio Faria de Oliveira
  0 siblings, 0 replies; 7+ messages in thread
From: Mauricio Faria de Oliveira @ 2016-06-02  9:05 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On 06/02/2016 06:00 AM, Mauricio Faria de Oliveira wrote:
> I actually use topology_core_id() from  <kernel/topology.h> in lpfc [1]

Er, <linux/topology.h> .. kinda early here :)


-- 
Mauricio Faria de Oliveira
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] powerpc: export cpu_to_core_id()
       [not found]   ` <201606020900.u528tQHH025445@mx0a-001b2d01.pphosted.com>
@ 2016-06-02 11:03     ` Michael Ellerman
  2016-06-02 11:22       ` Mauricio Faria de Oliveira
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Ellerman @ 2016-06-02 11:03 UTC (permalink / raw)
  To: Mauricio Faria de Oliveira, linuxppc-dev

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] powerpc: export cpu_to_core_id()
  2016-06-02 11:03     ` Michael Ellerman
@ 2016-06-02 11:22       ` Mauricio Faria de Oliveira
  0 siblings, 0 replies; 7+ messages in thread
From: Mauricio Faria de Oliveira @ 2016-06-02 11:22 UTC (permalink / raw)
  To: Michael Ellerman, linuxppc-dev

On 06/02/2016 08:03 AM, Michael Ellerman wrote:
> Can you send me a v2 with a change log that includes all that detail.

Sure; should have done it. Thanks.


-- 
Mauricio Faria de Oliveira
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-02 11:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01 20:16 [PATCH 1/3] powerpc: export cpu_to_core_id() Mauricio Faria de Oliveira
2016-06-01 20:19 ` Mauricio Faria de Oliveira
2016-06-02  7:41 ` Michael Ellerman
2016-06-02  9:00   ` Mauricio Faria de Oliveira
2016-06-02  9:05     ` Mauricio Faria de Oliveira
     [not found]   ` <201606020900.u528tQHH025445@mx0a-001b2d01.pphosted.com>
2016-06-02 11:03     ` Michael Ellerman
2016-06-02 11:22       ` Mauricio Faria de Oliveira

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.