]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Rename current_stack_pointer() to current_stack_frame()
authorMichael Ellerman <mpe@ellerman.id.au>
Thu, 20 Feb 2020 11:51:37 +0000 (22:51 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 4 Mar 2020 11:44:28 +0000 (22:44 +1100)
commite82bd4eb726ed86a939eca6ee917d427a9aaf025
tree89654d957af79c8d11e42fb531afa943b1f8e0e5
parent3375a6fd3ef1f3eb264e1ca0f47ddd8c807dd57d
powerpc: Rename current_stack_pointer() to current_stack_frame()

current_stack_pointer(), which was called __get_SP(), used to just
return the value in r1.

But that caused problems in some cases, so it was turned into a
function in commit d2be692d7759 ("powerpc: Reimplement __get_SP() as a
function not a define").

Because it's a function in a separate compilation unit to all its
callers, it has the effect of causing a stack frame to be created, and
then returns the address of that frame. This is good in some cases
like those described in the above commit, but in other cases it's
overkill, we just need to know what stack page we're on.

On some other arches current_stack_pointer is just a register global
giving the stack pointer, and we'd like to do that too. So rename our
current_stack_pointer() to current_stack_frame() to make that
possible.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Link: https://lore.kernel.org/r/20200220115141.2707-1-mpe@ellerman.id.au
arch/powerpc/include/asm/perf_event.h
arch/powerpc/include/asm/reg.h
arch/powerpc/kernel/irq.c
arch/powerpc/kernel/misc.S
arch/powerpc/kernel/process.c
arch/powerpc/kernel/stacktrace.c