diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2015-02-27 08:29:31 +0300 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-02-27 08:29:34 +0300 |
commit | 3240dd57e533da94998029af6e17008a1806c665 (patch) | |
tree | f23ae90f1d3861c7f2d0dc8fb7a8c6b0c39c1948 /arch/arc/include | |
parent | 13648b0118a24f4fc76c34e6c7b6ccf447e46a2a (diff) | |
download | linux-3240dd57e533da94998029af6e17008a1806c665.tar.xz |
ARC: Fix thread_saved_pc()
The old implementation assumed that SP at the time of __switch_to() is
right above pt_regs which is almost certainly not the case as there will
be some stack build up between entry into kernel and leading up to
__switch_to
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/include')
-rw-r--r-- | arch/arc/include/asm/processor.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arc/include/asm/processor.h b/arch/arc/include/asm/processor.h index 88398caa3989..52312cb5dbe2 100644 --- a/arch/arc/include/asm/processor.h +++ b/arch/arc/include/asm/processor.h @@ -47,9 +47,6 @@ struct thread_struct { /* Forward declaration, a strange C thing */ struct task_struct; -/* Return saved PC of a blocked thread */ -unsigned long thread_saved_pc(struct task_struct *t); - #define task_pt_regs(p) \ ((struct pt_regs *)(THREAD_SIZE + (void *)task_stack_page(p)) - 1) @@ -86,6 +83,8 @@ unsigned long thread_saved_pc(struct task_struct *t); #define TSK_K_BLINK(tsk) TSK_K_REG(tsk, 4) #define TSK_K_FP(tsk) TSK_K_REG(tsk, 0) +#define thread_saved_pc(tsk) TSK_K_BLINK(tsk) + extern void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long usp); |