From 0427fcb721571cc024a2cadf18044aabf5c15038 Mon Sep 17 00:00:00 2001 From: chenxiaoyi Date: Wed, 11 Dec 2024 20:52:41 +0800 Subject: [PATCH] xtensa: fix up_enable_dcache --- arch/xtensa/src/common/xtensa_cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/xtensa/src/common/xtensa_cache.c b/arch/xtensa/src/common/xtensa_cache.c index 9161ad55c8b..db3633b8bc8 100644 --- a/arch/xtensa/src/common/xtensa_cache.c +++ b/arch/xtensa/src/common/xtensa_cache.c @@ -348,13 +348,11 @@ void up_enable_dcache(void) /* Check if the D-Cache is enabled */ - if ((memctl & MEMCTL_INV_EN) != 0) + if ((memctl & (MEMCTL_DCWA_MASK | MEMCTL_DCWU_MASK)) != 0) { return; } - up_invalidate_dcache_all(); - /* set ways allocatable & ways use */ memctl = memctl & ~(MEMCTL_DCWA_MASK | MEMCTL_DCWU_MASK);