]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Add current_stack_pointer as a register global
authorChristophe Leroy <christophe.leroy@c-s.fr>
Thu, 20 Feb 2020 11:51:38 +0000 (22:51 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Mar 2020 11:44:28 +0000 (22:44 +1100)
commite0dfb01166dbba75fc9a837b4ed14223d68bcb26
tree80666884ccc3593086556b42897704d64e965a4e
parent10be03be029f2baaa99ec2a7056ef634f67e5f0c
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 commit 8d6f00015c40 ("powerpc: Reimplement
__get_SP() as a function not a define") and commit
e1ee1abe4d09 ("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
arch/powerpc/include/asm/reg.h