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>
This commit is contained in:
parent
b8732feaf7
commit
aa0ed1d733
|
@ -15,9 +15,7 @@
|
|||
/* clang-format off */
|
||||
|
||||
#define SBI_IPI_EVENT_SOFT 0x1
|
||||
#define SBI_IPI_EVENT_FENCE_I 0x2
|
||||
#define SBI_IPI_EVENT_SFENCE_VMA 0x4
|
||||
#define SBI_IPI_EVENT_SFENCE_VMA_ASID 0x8
|
||||
#define SBI_IPI_EVENT_FENCE 0x2
|
||||
#define SBI_IPI_EVENT_HALT 0x10
|
||||
|
||||
/* clang-format on */
|
||||
|
|
|
@ -147,7 +147,7 @@ int sbi_ecall_0_1_handler(struct sbi_scratch *scratch,
|
|||
tlb_info.type = SBI_ITLB_FLUSH;
|
||||
tlb_info.shart_mask = 1UL << source_hart;
|
||||
ret = sbi_ipi_send_many(scratch, out_trap, (ulong *)args[0],
|
||||
SBI_IPI_EVENT_FENCE_I, &tlb_info);
|
||||
SBI_IPI_EVENT_FENCE, &tlb_info);
|
||||
break;
|
||||
case SBI_EXT_0_1_REMOTE_SFENCE_VMA:
|
||||
tlb_info.start = (unsigned long)args[1];
|
||||
|
@ -156,7 +156,7 @@ int sbi_ecall_0_1_handler(struct sbi_scratch *scratch,
|
|||
tlb_info.shart_mask = 1UL << source_hart;
|
||||
|
||||
ret = sbi_ipi_send_many(scratch, out_trap, (ulong *)args[0],
|
||||
SBI_IPI_EVENT_SFENCE_VMA, &tlb_info);
|
||||
SBI_IPI_EVENT_FENCE, &tlb_info);
|
||||
break;
|
||||
case SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID:
|
||||
tlb_info.start = (unsigned long)args[1];
|
||||
|
@ -166,7 +166,7 @@ int sbi_ecall_0_1_handler(struct sbi_scratch *scratch,
|
|||
tlb_info.shart_mask = 1UL << source_hart;
|
||||
|
||||
ret = sbi_ipi_send_many(scratch, out_trap, (ulong *)args[0],
|
||||
SBI_IPI_EVENT_SFENCE_VMA_ASID,
|
||||
SBI_IPI_EVENT_FENCE,
|
||||
&tlb_info);
|
||||
break;
|
||||
case SBI_EXT_0_1_SHUTDOWN:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue