summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/smp.h
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2020-03-18 04:11:38 +0300
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-03-31 21:25:45 +0300
commit1ef46c231df4b856559ec0234bfcbb41a1180b97 (patch)
treebdb2f05e5b0412e732fa27656a1b176f1696a4f9 /arch/riscv/include/asm/smp.h
parentefca13989250c3edebaf8fcaa8ca7c966739c65a (diff)
downloadlinux-1ef46c231df4b856559ec0234bfcbb41a1180b97.tar.xz
RISC-V: Implement new SBI v0.2 extensions
Few v0.1 SBI calls are being replaced by new SBI calls that follows v0.2 calling convention. Implement the replacement extensions and few additional new SBI function calls that makes way for a better SBI interface in future. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include/asm/smp.h')
-rw-r--r--arch/riscv/include/asm/smp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h
index a83451d73a4e..023f74fb8b3b 100644
--- a/arch/riscv/include/asm/smp.h
+++ b/arch/riscv/include/asm/smp.h
@@ -61,5 +61,12 @@ static inline unsigned long cpuid_to_hartid_map(int cpu)
return boot_cpu_hartid;
}
+static inline void riscv_cpuid_to_hartid_mask(const struct cpumask *in,
+ struct cpumask *out)
+{
+ cpumask_clear(out);
+ cpumask_set_cpu(boot_cpu_hartid, out);
+}
+
#endif /* CONFIG_SMP */
#endif /* _ASM_RISCV_SMP_H */