From 8b3e97badf97d6e399014fb4a152031f8a0c94ba Mon Sep 17 00:00:00 2001 From: Lukas Auer Date: Sun, 8 Dec 2019 23:28:50 +0100 Subject: riscv: add functions for reading the IPI status Add the function riscv_get_ipi() for reading the pending status of IPIs. The supported controllers are Andes' Platform Level Interrupt Controller (PLIC), the Supervisor Binary Interface (SBI), and SiFive's Core Local Interruptor (CLINT). Signed-off-by: Lukas Auer Reviewed-by: Rick Chen --- arch/riscv/lib/sbi_ipi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/riscv/lib/sbi_ipi.c') diff --git a/arch/riscv/lib/sbi_ipi.c b/arch/riscv/lib/sbi_ipi.c index 170346da68..9a698ce74e 100644 --- a/arch/riscv/lib/sbi_ipi.c +++ b/arch/riscv/lib/sbi_ipi.c @@ -23,3 +23,14 @@ int riscv_clear_ipi(int hart) return 0; } + +int riscv_get_ipi(int hart, int *pending) +{ + /* + * The SBI does not support reading the IPI status. We always return 0 + * to indicate that no IPI is pending. + */ + *pending = 0; + + return 0; +} -- cgit