summaryrefslogtreecommitdiff
path: root/arch/xtensa
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2019-05-23 11:11:00 +0200
committerStefan Agner <stefan.agner@toradex.com>2019-05-23 11:11:00 +0200
commitb794ea49ba3816c0d5cf05506964a8e69ce4efa3 (patch)
treeb0e884d810b1c68b5615995a974cb2707ae02224 /arch/xtensa
parent2136d9515afb95a10fe9c2a2da1b54d31caa2e42 (diff)
parentd59f5a01fa438635ae098b2e170a18644df73c06 (diff)
Merge tag 'v5.0.17' into toradex_5.0.y
This is the 5.0.17 stable release
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/include/asm/processor.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/arch/xtensa/include/asm/processor.h b/arch/xtensa/include/asm/processor.h
index f7dd895b2353..0c14018d1c26 100644
--- a/arch/xtensa/include/asm/processor.h
+++ b/arch/xtensa/include/asm/processor.h
@@ -187,15 +187,18 @@ struct thread_struct {
/* Clearing a0 terminates the backtrace. */
#define start_thread(regs, new_pc, new_sp) \
- memset(regs, 0, sizeof(*regs)); \
- regs->pc = new_pc; \
- regs->ps = USER_PS_VALUE; \
- regs->areg[1] = new_sp; \
- regs->areg[0] = 0; \
- regs->wmask = 1; \
- regs->depc = 0; \
- regs->windowbase = 0; \
- regs->windowstart = 1;
+ do { \
+ memset((regs), 0, sizeof(*(regs))); \
+ (regs)->pc = (new_pc); \
+ (regs)->ps = USER_PS_VALUE; \
+ (regs)->areg[1] = (new_sp); \
+ (regs)->areg[0] = 0; \
+ (regs)->wmask = 1; \
+ (regs)->depc = 0; \
+ (regs)->windowbase = 0; \
+ (regs)->windowstart = 1; \
+ (regs)->syscall = NO_SYSCALL; \
+ } while (0)
/* Forward declaration */
struct task_struct;