summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/no_cpu
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-01-25 10:20:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-01-26 09:07:30 +0100
commita8865f8b415788c4e9bb7f68e38d41aec0e485db (patch)
treed7b70c608239be68c6476b0d9e9893e099ec8be6 /cpukit/score/cpu/no_cpu
parentscore: Add RTEMS_ALIGNED() (diff)
downloadrtems-a8865f8b415788c4e9bb7f68e38d41aec0e485db.tar.bz2
score: Introduce CPU_CACHE_LINE_BYTES
Add CPU_CACHE_LINE_BYTES for the maximum cache line size in bytes. The actual processor may use no cache or a smaller cache line size.
Diffstat (limited to 'cpukit/score/cpu/no_cpu')
-rw-r--r--cpukit/score/cpu/no_cpu/rtems/score/cpu.h21
1 files changed, 8 insertions, 13 deletions
diff --git a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
index ab81e649ef..67a725c09d 100644
--- a/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
+++ b/cpukit/score/cpu/no_cpu/rtems/score/cpu.h
@@ -311,29 +311,24 @@ extern "C" {
#define CPU_STACK_GROWS_UP TRUE
/**
+ * The maximum cache line size in bytes.
+ *
+ * The actual processor may use no cache or a smaller cache line size.
+ */
+#define CPU_CACHE_LINE_BYTES 32
+
+/**
* The following is the variable attribute used to force alignment
* of critical RTEMS structures. On some processors it may make
* sense to have these aligned on tighter boundaries than
* the minimum requirements of the compiler in order to have as
* much of the critical data area as possible in a cache line.
*
- * The placement of this macro in the declaration of the variables
- * is based on the syntactically requirements of the GNU C
- * "__attribute__" extension. For example with GNU C, use
- * the following to force a structures to a 32 byte boundary.
- *
- * __attribute__ ((aligned (32)))
- *
- * NOTE: Currently only the Priority Bit Map table uses this feature.
- * To benefit from using this, the data must be heavily
- * used so it will stay in the cache and used frequently enough
- * in the executive to justify turning this on.
- *
* Port Specific Information:
*
* XXX document implementation including references if appropriate
*/
-#define CPU_STRUCTURE_ALIGNMENT
+#define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES )
/**
* @defgroup CPUEndian Processor Dependent Endianness Support