* [PATCH v2] powerpc: export cpu_to_core_id()
@ 2016-06-02 11:45 Mauricio Faria de Oliveira
2016-06-06 22:04 ` Guilherme G. Piccoli
2016-06-21 12:27 ` [v2] " Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Mauricio Faria de Oliveira @ 2016-06-02 11:45 UTC (permalink / raw)
To: linuxppc-dev, mpe
Export cpu_to_core_id(). This will be used by the lpfc driver.
This enables topology_core_id() from <linux/topology.h> (defined
to cpu_to_core_id() in arch/powerpc/include/asm/topology.h) to be
used by (non-builtin) modules.
That is arch-neutral, already used by eg, drivers/base/topology.c,
but it is builtin (obj-y in Makefile) thus didn't need the export.
Since the module uses topology_core_id() and this is defined to
cpu_to_core_id(), it needs the export, otherwise:
ERROR: "cpu_to_core_id" [drivers/scsi/lpfc/lpfc.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
Tested on next-20160601.
Changelog:
- v2: include details about the need for this patch with regards
to the architecture-neutral topology API.
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] 3+ messages in thread
* Re: [PATCH v2] powerpc: export cpu_to_core_id()
2016-06-02 11:45 [PATCH v2] powerpc: export cpu_to_core_id() Mauricio Faria de Oliveira
@ 2016-06-06 22:04 ` Guilherme G. Piccoli
2016-06-21 12:27 ` [v2] " Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Guilherme G. Piccoli @ 2016-06-06 22:04 UTC (permalink / raw)
To: Mauricio Faria de Oliveira; +Cc: linuxppc-dev, mpe
On 06/02/2016 08:45 AM, Mauricio Faria de Oliveira wrote:
> Export cpu_to_core_id(). This will be used by the lpfc driver.
>
> This enables topology_core_id() from <linux/topology.h> (defined
> to cpu_to_core_id() in arch/powerpc/include/asm/topology.h) to be
> used by (non-builtin) modules.
>
> That is arch-neutral, already used by eg, drivers/base/topology.c,
> but it is builtin (obj-y in Makefile) thus didn't need the export.
>
> Since the module uses topology_core_id() and this is defined to
> cpu_to_core_id(), it needs the export, otherwise:
>
> ERROR: "cpu_to_core_id" [drivers/scsi/lpfc/lpfc.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
>
> Tested on next-20160601.
>
> Changelog:
> - v2: include details about the need for this patch with regards
> to the architecture-neutral topology API.
>
> 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)
>
Hi Maurício, I'm planning to use this in another driver heheh
Thanks for exporting the symbol.
I built a kernel with your patch and it's working fine, so you can add:
"Tested-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>"
Cheers,
Guilherme
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v2] powerpc: export cpu_to_core_id()
2016-06-02 11:45 [PATCH v2] powerpc: export cpu_to_core_id() Mauricio Faria de Oliveira
2016-06-06 22:04 ` Guilherme G. Piccoli
@ 2016-06-21 12:27 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2016-06-21 12:27 UTC (permalink / raw)
To: Mauricio Faria de Oliveira, linuxppc-dev
On Thu, 2016-02-06 at 11:45:14 UTC, Mauricio Faria de Oliveira wrote:
> Export cpu_to_core_id(). This will be used by the lpfc driver.
>
> This enables topology_core_id() from <linux/topology.h> (defined
> to cpu_to_core_id() in arch/powerpc/include/asm/topology.h) to be
> used by (non-builtin) modules.
>
> That is arch-neutral, already used by eg, drivers/base/topology.c,
> but it is builtin (obj-y in Makefile) thus didn't need the export.
>
> Since the module uses topology_core_id() and this is defined to
> cpu_to_core_id(), it needs the export, otherwise:
>
> ERROR: "cpu_to_core_id" [drivers/scsi/lpfc/lpfc.ko] undefined!
>
> Signed-off-by: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/f8ab481066e7246e4b272233aa
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-21 12:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-02 11:45 [PATCH v2] powerpc: export cpu_to_core_id() Mauricio Faria de Oliveira
2016-06-06 22:04 ` Guilherme G. Piccoli
2016-06-21 12:27 ` [v2] " Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).