aboutsummaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_ipi.c
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-01-15 11:02:14 +0530
committerAnup Patel <anup@brainfault.org>2020-01-22 12:10:35 +0530
commit3d2aaac69a967ff1986f57862c4048d42acfe1ec (patch)
tree9dc5ca7ed831638a1504ea6b715d8dfb9601af1a /lib/sbi/sbi_ipi.c
parent046cc16e8be254e18df49da63fa521d2f54e3ce1 (diff)
lib: Introduce sbi_ipi_send_smode() API
Instead of directly calling sbi_ipi_send_many(), we introduce sbi_ipi_send_smode() for injecting S-mode software interrupts. This way in future we can assign any IPI event number for S-mode IPIs within sbi_ipi.c only. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_ipi.c')
-rw-r--r--lib/sbi/sbi_ipi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c
index e5ebfb5..701b49b 100644
--- a/lib/sbi/sbi_ipi.c
+++ b/lib/sbi/sbi_ipi.c
@@ -101,6 +101,12 @@ int sbi_ipi_send_many(struct sbi_scratch *scratch, ulong hmask, ulong hbase,
return 0;
}
+int sbi_ipi_send_smode(struct sbi_scratch *scratch, ulong hmask, ulong hbase)
+{
+ return sbi_ipi_send_many(scratch, hmask, hbase,
+ SBI_IPI_EVENT_SOFT, NULL);
+}
+
void sbi_ipi_clear_smode(struct sbi_scratch *scratch)
{
csr_clear(CSR_MIP, MIP_SSIP);