diff mbox series

[v3,2/4] riscv: export __cpuid_to_hartid_map

Message ID 20241105183513.1358736-3-valentina.fernandezalanis@microchip.com (mailing list archive)
State New
Headers show
Series Add Microchip IPC mailbox | expand

Checks

Context Check Description
conchuod/vmtest-for-next-PR success PR summary
conchuod/patch-2-test-1 success .github/scripts/patches/tests/build_rv32_defconfig.sh took 102.24s
conchuod/patch-2-test-2 success .github/scripts/patches/tests/build_rv64_clang_allmodconfig.sh took 979.73s
conchuod/patch-2-test-3 success .github/scripts/patches/tests/build_rv64_gcc_allmodconfig.sh took 1147.17s
conchuod/patch-2-test-4 success .github/scripts/patches/tests/build_rv64_nommu_k210_defconfig.sh took 15.26s
conchuod/patch-2-test-5 success .github/scripts/patches/tests/build_rv64_nommu_virt_defconfig.sh took 16.58s
conchuod/patch-2-test-6 success .github/scripts/patches/tests/checkpatch.sh took 0.34s
conchuod/patch-2-test-7 success .github/scripts/patches/tests/dtb_warn_rv64.sh took 35.30s
conchuod/patch-2-test-8 success .github/scripts/patches/tests/header_inline.sh took 0.00s
conchuod/patch-2-test-9 success .github/scripts/patches/tests/kdoc.sh took 0.41s
conchuod/patch-2-test-10 success .github/scripts/patches/tests/module_param.sh took 0.01s
conchuod/patch-2-test-11 success .github/scripts/patches/tests/verify_fixes.sh took 0.00s
conchuod/patch-2-test-12 success .github/scripts/patches/tests/verify_signedoff.sh took 0.02s

Commit Message

Valentina Fernandez Nov. 5, 2024, 6:35 p.m. UTC
EXPORT_SYMBOL_GPL() is missing for __cpuid_to_hartid_map array.
Export this symbol to allow drivers compiled as modules to use
cpuid_to_hartid_map().

Signed-off-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
---
 arch/riscv/kernel/smp.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Rob Herring (Arm) Nov. 11, 2024, 9:52 p.m. UTC | #1
On Tue, Nov 05, 2024 at 06:35:11PM +0000, Valentina Fernandez wrote:
> EXPORT_SYMBOL_GPL() is missing for __cpuid_to_hartid_map array.
> Export this symbol to allow drivers compiled as modules to use
> cpuid_to_hartid_map().
> 
> Signed-off-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
> ---
>  arch/riscv/kernel/smp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
> index c180a647a30e..d58b5e751286 100644
> --- a/arch/riscv/kernel/smp.c
> +++ b/arch/riscv/kernel/smp.c
> @@ -43,6 +43,7 @@ enum ipi_message_type {
>  unsigned long __cpuid_to_hartid_map[NR_CPUS] __ro_after_init = {
>  	[0 ... NR_CPUS-1] = INVALID_HARTID
>  };
> +EXPORT_SYMBOL_GPL(__cpuid_to_hartid_map);

Why can't riscv implement cpu_logical_map() like other arches?

We really should have a common implementation too, but that's probably 
too much to ask I guess.

Rob
Atish Patra Nov. 19, 2024, 8:32 p.m. UTC | #2
On Mon, Nov 11, 2024 at 1:52 PM Rob Herring <robh@kernel.org> wrote:
>
> On Tue, Nov 05, 2024 at 06:35:11PM +0000, Valentina Fernandez wrote:
> > EXPORT_SYMBOL_GPL() is missing for __cpuid_to_hartid_map array.
> > Export this symbol to allow drivers compiled as modules to use
> > cpuid_to_hartid_map().
> >
> > Signed-off-by: Valentina Fernandez <valentina.fernandezalanis@microchip.com>
> > ---
> >  arch/riscv/kernel/smp.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
> > index c180a647a30e..d58b5e751286 100644
> > --- a/arch/riscv/kernel/smp.c
> > +++ b/arch/riscv/kernel/smp.c
> > @@ -43,6 +43,7 @@ enum ipi_message_type {
> >  unsigned long __cpuid_to_hartid_map[NR_CPUS] __ro_after_init = {
> >       [0 ... NR_CPUS-1] = INVALID_HARTID
> >  };
> > +EXPORT_SYMBOL_GPL(__cpuid_to_hartid_map);
>
> Why can't riscv implement cpu_logical_map() like other arches?
>

We can and we should :)

> We really should have a common implementation too, but that's probably
> too much to ask I guess.
>
> Rob
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
diff mbox series

Patch

diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index c180a647a30e..d58b5e751286 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -43,6 +43,7 @@  enum ipi_message_type {
 unsigned long __cpuid_to_hartid_map[NR_CPUS] __ro_after_init = {
 	[0 ... NR_CPUS-1] = INVALID_HARTID
 };
+EXPORT_SYMBOL_GPL(__cpuid_to_hartid_map);
 
 void __init smp_setup_processor_id(void)
 {