cache: fix up_clean_dcache() slowly

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-08-09 14:17:48 +08:00 committed by Petro Karashchenko
parent 10529c7d0a
commit 4c19130d1d
2 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ void up_invalidate_icache_all(void)
void up_clean_dcache(uintptr_t start, uintptr_t end)
{
if (cp15_cache_size() < (end - start))
if ((end - start) < cp15_cache_size())
{
cp15_clean_dcache(start, end);
}
@ -198,7 +198,7 @@ void up_clean_dcache_all(void)
void up_flush_dcache(uintptr_t start, uintptr_t end)
{
if (cp15_cache_size() < (end - start))
if ((end - start) < cp15_cache_size())
{
cp15_flush_dcache(start, end);
}

View File

@ -134,7 +134,7 @@ void up_invalidate_icache_all(void)
void up_clean_dcache(uintptr_t start, uintptr_t end)
{
if (cp15_cache_size() < (end - start))
if ((end - start) < cp15_cache_size())
{
cp15_clean_dcache(start, end);
}
@ -198,7 +198,7 @@ void up_clean_dcache_all(void)
void up_flush_dcache(uintptr_t start, uintptr_t end)
{
if (cp15_cache_size() < (end - start))
if ((end - start) < cp15_cache_size())
{
cp15_flush_dcache(start, end);
}