Skip to content

Commit c5136ad

Browse files
klarasmpalmer-dabbelt
authored andcommitted
riscv: export boot_cpu_hartid
The mailbox controller driver for the Microchip Inter-processor Communication can be built as a module. It uses cpuid_to_hartid_map and commit 4783ce3 ("riscv: export __cpuid_to_hartid_map") enables that to work for SMP. However, cpuid_to_hartid_map uses boot_cpu_hartid on non-SMP kernels and this driver can be useful in such configurations[1]. Export boot_cpu_hartid so the driver can be built as a module on non-SMP kernels as well. Link: https://lore.kernel.org/lkml/20250617-confess-reimburse-876101e099cb@spud/ [1] Cc: [email protected] Fixes: e4b1d67 ("mailbox: add Microchip IPC support") Signed-off-by: Klara Modin <[email protected]> Acked-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 890ba5b commit c5136ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/kernel/setup.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ atomic_t hart_lottery __section(".sdata")
5050
#endif
5151
;
5252
unsigned long boot_cpu_hartid;
53+
EXPORT_SYMBOL_GPL(boot_cpu_hartid);
5354

5455
/*
5556
* Place kernel memory regions on the resource tree so that

0 commit comments

Comments
 (0)