[rtems commit] bdbuf: Use rtems_cache_get_data_line_size()
Sebastian Huber
sebh at rtems.org
Thu Nov 20 13:53:25 UTC 2014
Module: rtems
Branch: master
Commit: 3bb9c61c588bf532ead85f9da2cff1951df8be49
Changeset: http://git.rtems.org/rtems/commit/?id=3bb9c61c588bf532ead85f9da2cff1951df8be49
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Nov 20 09:03:50 2014 +0100
bdbuf: Use rtems_cache_get_data_line_size()
---
cpukit/libblock/src/bdbuf.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index f215911..e1ed039 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -1513,7 +1513,6 @@ rtems_bdbuf_do_init (void)
rtems_bdbuf_buffer* bd;
uint8_t* buffer;
size_t b;
- size_t cache_aligment;
rtems_status_code sc;
if (rtems_bdbuf_tracer)
@@ -1533,13 +1532,6 @@ rtems_bdbuf_do_init (void)
> RTEMS_MINIMUM_STACK_SIZE / 8U)
return RTEMS_INVALID_NUMBER;
- /*
- * For unspecified cache alignments we use the CPU alignment.
- */
- cache_aligment = 32; /* FIXME rtems_cache_get_data_line_size() */
- if (cache_aligment <= 0)
- cache_aligment = CPU_ALIGNMENT;
-
bdbuf_cache.sync_device = BDBUF_INVALID_DEV;
rtems_chain_initialize_empty (&bdbuf_cache.swapout_free_workers);
@@ -1613,7 +1605,7 @@ rtems_bdbuf_do_init (void)
* The memory allocate allows a
*/
if (rtems_memalign ((void **) &bdbuf_cache.buffers,
- cache_aligment,
+ rtems_cache_get_data_line_size(),
bdbuf_cache.buffer_min_count * bdbuf_config.buffer_min) != 0)
goto error;
More information about the vc
mailing list