arm64: dts: Revert "specify console via command line"
[linux/fpc-iii.git] / arch / riscv / include / asm / clint.h
blob6eaa2eedd69418d0baf4efad5516bf9e96d044c0
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_RISCV_CLINT_H
3 #define _ASM_RISCV_CLINT_H 1
5 #include <linux/io.h>
6 #include <linux/smp.h>
8 #ifdef CONFIG_RISCV_M_MODE
9 extern u32 __iomem *clint_ipi_base;
11 void clint_init_boot_cpu(void);
13 static inline void clint_send_ipi_single(unsigned long hartid)
15 writel(1, clint_ipi_base + hartid);
18 static inline void clint_send_ipi_mask(const struct cpumask *hartid_mask)
20 int hartid;
22 for_each_cpu(hartid, hartid_mask)
23 clint_send_ipi_single(hartid);
26 static inline void clint_clear_ipi(unsigned long hartid)
28 writel(0, clint_ipi_base + hartid);
30 #else /* CONFIG_RISCV_M_MODE */
31 #define clint_init_boot_cpu() do { } while (0)
33 /* stubs to for code is only reachable under IS_ENABLED(CONFIG_RISCV_M_MODE): */
34 void clint_send_ipi_single(unsigned long hartid);
35 void clint_send_ipi_mask(const struct cpumask *hartid_mask);
36 void clint_clear_ipi(unsigned long hartid);
37 #endif /* CONFIG_RISCV_M_MODE */
39 #endif /* _ASM_RISCV_CLINT_H */