summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-10-07 14:29:19 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-10-07 14:29:19 +0000
commit100446d4128d405dbd15edc73b1a17c962d2f023 (patch)
tree0f0fa2f799507fb1cc85f19c4162136b90230d16 /cpukit
parent2011-10-07 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-100446d4128d405dbd15edc73b1a17c962d2f023.tar.bz2
2011-10-07 Daniel Hellstrom <daniel@gaisler.com>
PR 1931/cpukit * score/src/percpu.c: The stack must be aligned to CPU alignment requirement.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog6
-rw-r--r--cpukit/score/src/percpu.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index bbf76f588c..d061583506 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,9 @@
+2011-10-07 Daniel Hellstrom <daniel@gaisler.com>
+
+ PR 1931/cpukit
+ * score/src/percpu.c: The stack must be aligned to CPU alignment
+ requirement.
+
2011-10-07 Ralf Corsépius <ralf.corsepius@rtems.org>
* score/src/threadhandler.c: Don't undefine __USE_INIT_FINI__ for
diff --git a/cpukit/score/src/percpu.c b/cpukit/score/src/percpu.c
index 631e662d7e..b48e61c8c3 100644
--- a/cpukit/score/src/percpu.c
+++ b/cpukit/score/src/percpu.c
@@ -50,7 +50,7 @@
p->interrupt_stack_low = _Workspace_Allocate_or_fatal_error( size );
ptr = (uintptr_t) _Addresses_Add_offset( p->interrupt_stack_low, size );
- ptr &= ~CPU_STACK_ALIGNMENT;
+ ptr &= ~(CPU_STACK_ALIGNMENT - 1);
p->interrupt_stack_high = (void *)ptr;
p->state = RTEMS_BSP_SMP_CPU_INITIAL_STATE;
RTEMS_COMPILER_MEMORY_BARRIER();