summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/lib/cache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/riscv/lib/cache.c b/arch/riscv/lib/cache.c
index 78b19da2c5..5437a122a1 100644
--- a/arch/riscv/lib/cache.c
+++ b/arch/riscv/lib/cache.c
@@ -40,8 +40,8 @@ void cache_flush(void)
void flush_cache(unsigned long addr, unsigned long size)
{
- invalidate_icache_all();
- flush_dcache_all();
+ invalidate_icache_range(addr, addr + size);
+ flush_dcache_range(addr, addr + size);
}
__weak void icache_enable(void)