platform/nuttx: Fix dcache operation in os_dcache_flush (#4225)

Replace up_invalidate_dcache_all() with up_flush_dcache_all() in
os_dcache_flush() to properly flush the data cache instead of just
invalidating it. This ensures that any modified data in the cache
is written back to memory before execution.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2025-05-06 06:55:53 +08:00 committed by GitHub
parent 382aa9e6c3
commit 5bdbba0dbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -118,7 +118,7 @@ os_dcache_flush()
up_textheap_data_sync();
#endif
#ifndef CONFIG_BUILD_KERNEL
up_invalidate_dcache_all();
up_flush_dcache_all();
#endif
}