Commit 0ebc1f56 authored by Behan Webster's avatar Behan Webster Committed by Russell King

ARM: 8175/1: Use current_stack_pointer to calculate pt_regs address

Use the global current_stack_pointer to calculate the end of the stack for
current_pt_regs()
Signed-off-by: default avatarBehan Webster <behanw@converseincode.com>
Reviewed-by: default avatarMark Charlebois <charlebm@gmail.com>
Reviewed-by: default avatarJan-Simon Möller <dl9pf@gmx.de>
Acked-by: default avatarWill Deacon <will.deacon@arm.com>
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent ccbd2da5
...@@ -154,9 +154,8 @@ static inline unsigned long user_stack_pointer(struct pt_regs *regs) ...@@ -154,9 +154,8 @@ static inline unsigned long user_stack_pointer(struct pt_regs *regs)
return regs->ARM_sp; return regs->ARM_sp;
} }
#define current_pt_regs(void) ({ \ #define current_pt_regs(void) ({ (struct pt_regs *) \
register unsigned long sp asm ("sp"); \ ((current_stack_pointer | (THREAD_SIZE - 1)) - 7) - 1; \
(struct pt_regs *)((sp | (THREAD_SIZE - 1)) - 7) - 1; \
}) })
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment