mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
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:
@@ -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__
|
__asm__ __volatile__
|
||||||
(
|
(
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ extern uintptr_t g_kernel_pgt_pbase;
|
|||||||
* Public Function Prototypes
|
* Public Function Prototypes
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void weak_function mmu_flush_cache(void);
|
void weak_function mmu_flush_cache(uintptr_t);
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Inline Functions
|
* Inline Functions
|
||||||
@@ -216,7 +216,7 @@ static inline void mmu_write_satp(uintptr_t reg)
|
|||||||
|
|
||||||
if (mmu_flush_cache != NULL)
|
if (mmu_flush_cache != NULL)
|
||||||
{
|
{
|
||||||
mmu_flush_cache();
|
mmu_flush_cache(reg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user