powerpc: Add current_stack_pointer as a register global
current_stack_frame() doesn't return the stack pointer, but the caller's stack frame. See commitbfe9a2cfe9
("powerpc: Reimplement __get_SP() as a function not a define") and commitacf620ecf5
("powerpc: Rename __get_SP() to current_stack_pointer()") for details. In some cases this is overkill or incorrect, as it doesn't return the current value of r1. So add a current_stack_pointer register global to get the value of r1 directly. Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> [mpe: Split out of other patch, tweak change log] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200220115141.2707-2-mpe@ellerman.id.au
This commit is contained in:

committed by
Michael Ellerman

parent
3d13e839e8
commit
0e63f01517
@@ -1450,6 +1450,8 @@ static inline void mtsrin(u32 val, u32 idx)
|
||||
|
||||
extern unsigned long current_stack_frame(void);
|
||||
|
||||
register unsigned long current_stack_pointer asm("r1");
|
||||
|
||||
extern unsigned long scom970_read(unsigned int address);
|
||||
extern void scom970_write(unsigned int address, unsigned long value);
|
||||
|
||||
|
Reference in New Issue
Block a user