Skip to content

Commit 7391efa

Browse files
avpatelpalmer-dabbelt
authored andcommitted
RISC-V: Export riscv_cpuid_to_hartid_mask() API
The riscv_cpuid_to_hartid_mask() API should be exported to allow building KVM RISC-V as loadable module. Signed-off-by: Anup Patel <[email protected]> Reviewed-by: Palmer Dabbelt <[email protected]> Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 1d2cc5a commit 7391efa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/riscv/kernel/smp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <linux/cpu.h>
1212
#include <linux/interrupt.h>
13+
#include <linux/module.h>
1314
#include <linux/profile.h>
1415
#include <linux/smp.h>
1516
#include <linux/sched.h>
@@ -63,6 +64,7 @@ void riscv_cpuid_to_hartid_mask(const struct cpumask *in, struct cpumask *out)
6364
for_each_cpu(cpu, in)
6465
cpumask_set_cpu(cpuid_to_hartid_map(cpu), out);
6566
}
67+
EXPORT_SYMBOL_GPL(riscv_cpuid_to_hartid_mask);
6668

6769
bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
6870
{

0 commit comments

Comments
 (0)