diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-19 06:43:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-07-19 08:12:32 +0200 |
commit | 8d785f72d9610fb80a65d7848404f0f7507e026c (patch) | |
tree | 17e23f59e7cb50bdc701b9840cdea5c6277443b4 /c/src/lib/libcpu/powerpc/mpc6xx | |
parent | beagle: pwm polishing (diff) | |
download | rtems-8d785f72d9610fb80a65d7848404f0f7507e026c.tar.bz2 |
bsps/powerpc: Fix AtliVec context switch
Properly pass the stack aligned context to _CPU_Context_switch_altivec()
since _CPU_altivec_ctxt_off defined via ppc_context.
Close #2761.
Diffstat (limited to 'c/src/lib/libcpu/powerpc/mpc6xx')
-rw-r--r-- | c/src/lib/libcpu/powerpc/mpc6xx/altivec/vec_sup.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/powerpc/mpc6xx/altivec/vec_sup.c b/c/src/lib/libcpu/powerpc/mpc6xx/altivec/vec_sup.c index 07b9fd2d50..141779c175 100644 --- a/c/src/lib/libcpu/powerpc/mpc6xx/altivec/vec_sup.c +++ b/c/src/lib/libcpu/powerpc/mpc6xx/altivec/vec_sup.c @@ -234,6 +234,12 @@ unsigned pvr; * Therefore, we compute it here and store it in memory... */ _CPU_altivec_ctxt_off = offsetof(ppc_context, altivec); + + /* + * See ppc_get_context() and PPC_CONTEXT_OFFSET_GPR1 + */ + _CPU_altivec_ctxt_off += PPC_DEFAULT_CACHE_LINE_SIZE; + /* * Add space possibly needed for alignment */ |