summaryrefslogtreecommitdiff
path: root/lib/sbi/sbi_ipi.c
diff options
context:
space:
mode:
authorAtish Patra <atish.patra@wdc.com>2019-11-25 10:33:45 +0300
committerAnup Patel <anup@brainfault.org>2019-12-23 06:42:08 +0300
commitaa0ed1d7338019af8c785274c99b13caa59ce1f5 (patch)
treee3ff3302cae08dea0d5af165c19b69a9d1439c60 /lib/sbi/sbi_ipi.c
parentb8732feaf7d48fddc5c06866879380575e601823 (diff)
downloadopensbi-aa0ed1d7338019af8c785274c99b13caa59ce1f5.tar.xz
lib: Remove redundant IPI types
We just need to distinguish only between FENCE and non FENCE related IPIs as all of the fence related requests are handled via fifo now. Remove the unnecessary IPI types related to individual fence types. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'lib/sbi/sbi_ipi.c')
-rw-r--r--lib/sbi/sbi_ipi.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/lib/sbi/sbi_ipi.c b/lib/sbi/sbi_ipi.c
index af8d62d..8dc78a5 100644
--- a/lib/sbi/sbi_ipi.c
+++ b/lib/sbi/sbi_ipi.c
@@ -38,9 +38,7 @@ static int sbi_ipi_send(struct sbi_scratch *scratch, u32 hartid, u32 event,
*/
remote_scratch = sbi_hart_id_to_scratch(scratch, hartid);
ipi_data = sbi_scratch_offset_ptr(remote_scratch, ipi_data_off);
- if (event == SBI_IPI_EVENT_SFENCE_VMA ||
- event == SBI_IPI_EVENT_SFENCE_VMA_ASID ||
- event == SBI_IPI_EVENT_FENCE_I ) {
+ if (event == SBI_IPI_EVENT_FENCE) {
ret = sbi_tlb_fifo_update(remote_scratch, hartid, data);
if (ret < 0)
return ret;
@@ -49,11 +47,8 @@ static int sbi_ipi_send(struct sbi_scratch *scratch, u32 hartid, u32 event,
smp_wmb();
sbi_platform_ipi_send(plat, hartid);
- if (event == SBI_IPI_EVENT_SFENCE_VMA ||
- event == SBI_IPI_EVENT_SFENCE_VMA_ASID ||
- event == SBI_IPI_EVENT_FENCE_I ) {
+ if (event == SBI_IPI_EVENT_FENCE)
sbi_tlb_fifo_sync(scratch);
- }
return 0;
}
@@ -113,9 +108,7 @@ void sbi_ipi_process(struct sbi_scratch *scratch)
case SBI_IPI_EVENT_SOFT:
csr_set(CSR_MIP, MIP_SSIP);
break;
- case SBI_IPI_EVENT_FENCE_I:
- case SBI_IPI_EVENT_SFENCE_VMA:
- case SBI_IPI_EVENT_SFENCE_VMA_ASID:
+ case SBI_IPI_EVENT_FENCE:
sbi_tlb_fifo_process(scratch);
break;
case SBI_IPI_EVENT_HALT: