lib: sbi: Expose __sbi_sfence_vma_all() function

The __sbi_sfence_vma_all() can be shared by different parts of
OpenSBI so rename __tlb_flush_all() to __sbi_sfence_vma_all()
and make it global function.

Signed-off-by: Andrew Waterman <andrew@sifive.com>
Signed-off-by: Anup Patel <apatel@ventanamicro.com>
Link: https://lore.kernel.org/r/20251127112121.334023-2-apatel@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Andrew Waterman
2025-11-27 16:51:20 +05:30
committed by Anup Patel
parent 5eec86eec8
commit 843e916dca
3 changed files with 6 additions and 3 deletions

View File

@@ -12,6 +12,7 @@
#include <sbi/sbi_hfence.h>
#include <sbi/sbi_math.h>
#include <sbi/sbi_platform.h>
#include <sbi/sbi_tlb.h>
#include <sbi/riscv_asm.h>
/*
@@ -74,7 +75,7 @@ static void sbi_hart_pmp_fence(void)
* conditions.
*/
if (misa_extension('S')) {
__asm__ __volatile__("sfence.vma");
__sbi_sfence_vma_all();
/*
* If hypervisor mode is supported, flush caching