summaryrefslogtreecommitdiff
path: root/arch/riscv/lib/sbi_ipi.c
diff options
context:
space:
mode:
authorLukas Auer <lukas.auer@aisec.fraunhofer.de>2019-12-09 01:28:50 +0300
committerAndes <uboot@andestech.com>2019-12-10 03:23:10 +0300
commit8b3e97badf97d6e399014fb4a152031f8a0c94ba (patch)
tree63c6e428e63506f5c1010b905159c67b178332f0 /arch/riscv/lib/sbi_ipi.c
parentb86f6d1e649f237849297b5ec6b5566b7a92b2b4 (diff)
downloadu-boot-8b3e97badf97d6e399014fb4a152031f8a0c94ba.tar.xz
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 <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'arch/riscv/lib/sbi_ipi.c')
-rw-r--r--arch/riscv/lib/sbi_ipi.c11
1 files changed, 11 insertions, 0 deletions
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;
+}