risc-v/common: add param to mmu_flush_cache interface

Current mmu_flush_cache() hook lacks the reg param which needed by
some targets. So this PR adds the param and update existing targets
using that hook.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu
2024-02-04 10:53:53 +08:00
committed by Xiang Xiao
parent d79e5a4932
commit 73ecd741e7
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -307,8 +307,9 @@ void bl808_mm_init(void)
*
****************************************************************************/
void weak_function mmu_flush_cache(void)
void weak_function mmu_flush_cache(uintptr_t reg)
{
UNUSED(reg);
__asm__ __volatile__
(
+2 -2
View File
@@ -158,7 +158,7 @@ extern uintptr_t g_kernel_pgt_pbase;
* Public Function Prototypes
****************************************************************************/
void weak_function mmu_flush_cache(void);
void weak_function mmu_flush_cache(uintptr_t);
/****************************************************************************
* Inline Functions
@@ -216,7 +216,7 @@ static inline void mmu_write_satp(uintptr_t reg)
if (mmu_flush_cache != NULL)
{
mmu_flush_cache();
mmu_flush_cache(reg);
}
}