mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
riscv: use invalidate/flush_*cache_range functions in cache.c
The flush_cache() function in lib/cache.c ignores its arguments and flushes the complete data and instruction caches. Use the invalidate/flush_*cache_range() functions instead to only flush the requested memory region. This patch does not change the current behavior of U-Boot, since the implementation of the invalidate/flush_*cache_range() functions flush the complete data and instruction caches. It is in preparation for CPUs with the necessary functionality for flushing a selectable memory range. Signed-off-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
c9056653ec
commit
f74c416e62
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue