up_coherent_dcache should do nothing the the length is zero

This commit is contained in:
Gregory Nutt 2014-08-26 14:51:53 -06:00
parent b13d9b4161
commit 519e9c85e9
1 changed files with 6 additions and 3 deletions

View File

@ -82,13 +82,16 @@
void up_coherent_dcache(uintptr_t addr, size_t len)
{
/* Perform the operation on the L1 cache */
if (len > 0)
{
/* Perform the operation on the L1 cache */
cp15_coherent_dcache(addr, addr+len);
cp15_coherent_dcache(addr, addr + len - 1);
#ifdef CONFIG_ARCH_L2CACHE
/* If we have an L2 cache, then there more things that need to done */
/* If we have an L2 cache, then there more things that need to done */
# warning This is insufficient
#endif
}
}