From c575928c9904e7fbee1aa89bee480e91fd6a104c Mon Sep 17 00:00:00 2001 From: jasonhu <2323168280@qq.com> Date: Mon, 8 Nov 2021 15:02:09 +0800 Subject: [PATCH] [libcpu][c906] fix bug on cache invalidate --- libcpu/risc-v/t-head/c906/cache.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libcpu/risc-v/t-head/c906/cache.c b/libcpu/risc-v/t-head/c906/cache.c index d8f552c2c9..4250f3a1d2 100644 --- a/libcpu/risc-v/t-head/c906/cache.c +++ b/libcpu/risc-v/t-head/c906/cache.c @@ -124,14 +124,14 @@ void rt_hw_cpu_dcache_ops(int ops,void *addr,int size) void rt_hw_cpu_dcache_clean_all(void) { - /* asm volatile("dcache.ciall\n":::"memory"); */ - asm volatile(".long 0x0030000b\n":::"memory"); + /* asm volatile("dcache.call\n":::"memory"); */ + asm volatile(".long 0x0010000b\n":::"memory"); } void rt_hw_cpu_dcache_invalidate_all(void) { - /* asm volatile("dcache.iall\n":::"memory"); */ - asm volatile(".long 0x0020000b\n":::"memory"); + /* asm volatile("dcache.ciall\n":::"memory"); */ + asm volatile(".long 0x0030000b\n":::"memory"); } void rt_hw_cpu_icache_invalidate_all(void) -- Gitee