diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-08-26 14:51:53 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-08-26 14:51:53 -0600 |
commit | 9d42a5757f9c020c358b54d5bdf359819a6c4f1d (patch) | |
tree | 58bcb95045869605aab02968db7a082d4741873d | |
parent | b6ed8d1bed845fdba8ba207776dc1f7b83de57fd (diff) | |
download | nuttx-9d42a5757f9c020c358b54d5bdf359819a6c4f1d.tar.gz nuttx-9d42a5757f9c020c358b54d5bdf359819a6c4f1d.tar.bz2 nuttx-9d42a5757f9c020c358b54d5bdf359819a6c4f1d.zip |
up_coherent_dcache should do nothing the the length is zero
-rw-r--r-- | nuttx/arch/arm/src/armv7-a/arm_coherent_dcache.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/nuttx/arch/arm/src/armv7-a/arm_coherent_dcache.c b/nuttx/arch/arm/src/armv7-a/arm_coherent_dcache.c index 6c0d4d7ce..1cb134c92 100644 --- a/nuttx/arch/arm/src/armv7-a/arm_coherent_dcache.c +++ b/nuttx/arch/arm/src/armv7-a/arm_coherent_dcache.c @@ -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 + } } |