From a8865f8b415788c4e9bb7f68e38d41aec0e485db Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 25 Jan 2016 10:20:28 +0100 Subject: 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. --- cpukit/score/cpu/powerpc/rtems/score/cpu.h | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'cpukit/score/cpu/powerpc/rtems/score') diff --git a/cpukit/score/cpu/powerpc/rtems/score/cpu.h b/cpukit/score/cpu/powerpc/rtems/score/cpu.h index 5e822e4d7d..f988f8acf6 100644 --- a/cpukit/score/cpu/powerpc/rtems/score/cpu.h +++ b/cpukit/score/cpu/powerpc/rtems/score/cpu.h @@ -101,28 +101,9 @@ extern "C" { #define CPU_STACK_GROWS_UP FALSE -/* - * 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. - */ +#define CPU_CACHE_LINE_BYTES PPC_STRUCTURE_ALIGNMENT -#define CPU_STRUCTURE_ALIGNMENT \ - __attribute__ ((aligned (PPC_STRUCTURE_ALIGNMENT))) +#define CPU_STRUCTURE_ALIGNMENT RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES ) /* * Define what is required to specify how the network to host conversion -- cgit v1.2.3