From 9e4f21b927e8a81df8044806e88128388911e123 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Sat, 1 Feb 2020 15:42:27 +0100 Subject: score: Optimize per-processor data placement Only align per-processor data in SMP configurations. --- cpukit/score/src/wkspace.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cpukit/score') diff --git a/cpukit/score/src/wkspace.c b/cpukit/score/src/wkspace.c index 0834438dd1..d363b8d3b2 100644 --- a/cpukit/score/src/wkspace.c +++ b/cpukit/score/src/wkspace.c @@ -37,7 +37,14 @@ RTEMS_LINKER_RWSET( _Per_CPU_Data, - RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES ) char +#if defined(RTEMS_SMP) + /* + * In SMP configurations, prevent false cache line sharing of per-processor + * data with a proper alignment. + */ + RTEMS_ALIGNED( CPU_CACHE_LINE_BYTES ) +#endif + char ); Heap_Control _Workspace_Area; -- cgit v1.2.3