[rtems commit] bsps/arm: L2C 310 avoid infinite loops
Sebastian Huber
sebh at rtems.org
Tue Nov 25 15:19:51 UTC 2014
Module: rtems
Branch: master
Commit: 42fe0d3fbbf8ace7e917eb09b36d278f30b713c8
Changeset: http://git.rtems.org/rtems/commit/?id=42fe0d3fbbf8ace7e917eb09b36d278f30b713c8
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Nov 25 08:36:58 2014 +0100
bsps/arm: L2C 310 avoid infinite loops
---
c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h b/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h
index 63940c3..35c8002 100644
--- a/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h
+++ b/c/src/lib/libbsp/arm/shared/arm-l2c-310/cache_.h
@@ -882,6 +882,10 @@ l2c_310_flush_range( const void* d_addr, const size_t n_bytes )
L2C_310_MIN( ADDR_LAST, adx + L2C_310_MAX_LOCKING_BYTES );
volatile L2CC *l2cc = (volatile L2CC *) BSP_ARM_L2C_310_BASE;
+ if ( n_bytes == 0 ) {
+ return;
+ }
+
for (;
adx <= ADDR_LAST;
adx = block_end + 1,
@@ -946,6 +950,10 @@ l2c_310_invalidate_range( const void* d_addr, const size_t n_bytes )
L2C_310_MIN( ADDR_LAST, adx + L2C_310_MAX_LOCKING_BYTES );
volatile L2CC *l2cc = (volatile L2CC *) BSP_ARM_L2C_310_BASE;
+ if ( n_bytes == 0 ) {
+ return;
+ }
+
for (;
adx <= ADDR_LAST;
adx = block_end + 1,
More information about the vc
mailing list