diff options
author | Mazen NEIFER <mazen@nestwave.com> | 2017-01-27 19:43:52 +0100 |
---|---|---|
committer | Andrew Boie <andrew.p.boie@intel.com> | 2017-01-30 09:04:12 -0800 |
commit | ca1749c03d26e28b5ef46b64d2eda0a9e487a576 (patch) | |
tree | a6014c92773ec44426284ccdd98f8ebeb86e6249 | |
parent | 3199ceea84756f0d959ac52e23bad93a15b086f5 (diff) |
Xtensa port: _thread_entry shall use call4 to start the thread.
The function _new_thread sets the CALLINC for _thread_entry when calling the
new thread entry point. This should be CALLINC(1) (call4) instead of previous
one CALLINC(2) (call8).
This change allows resolving a crash when starting the first thread.
Change-Id: Ie97c95c87d1219342fed09f670fcae8a6230cefe
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
-rw-r--r-- | arch/xtensa/core/thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/xtensa/core/thread.c b/arch/xtensa/core/thread.c index 3cc4574f9..02b6b5a2e 100644 --- a/arch/xtensa/core/thread.c +++ b/arch/xtensa/core/thread.c @@ -126,12 +126,12 @@ void _new_thread(char *pStack, size_t stackSize, pInitCtx->a5 = (uint32_t)p3; pInitCtx->ps = PS_UM | PS_EXCM; #else - /* For windowed ABI set also WOE and CALLINC (pretend task is 'call8'). */ + /* For windowed ABI set also WOE and CALLINC (pretend task is 'call4'). */ pInitCtx->a6 = (uint32_t)pEntry; pInitCtx->a7 = (uint32_t)p1; pInitCtx->a8 = (uint32_t)p2; pInitCtx->a9 = (uint32_t)p3; - pInitCtx->ps = PS_UM | PS_EXCM | PS_WOE | PS_CALLINC(2); + pInitCtx->ps = PS_UM | PS_EXCM | PS_WOE | PS_CALLINC(1); #endif tcs->callee_saved.topOfStack = pInitCtx; tcs->arch.flags = 0; |