[PATCH v3 1/5] powerpc: Rename current_stack_pointer() to current_stack_frame()

Michael Ellerman patch-notifications at ellerman.id.au
Fri Mar 6 11:27:54 AEDT 2020


On Thu, 2020-02-20 at 11:51:37 UTC, Michael Ellerman wrote:
> 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 bfe9a2cfe91a ("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 at ellerman.id.au>

Series applied to powerpc next.

https://git.kernel.org/powerpc/c/3d13e839e801e081bdece0127c2affa33d0f77cf

cheers


More information about the Linuxppc-dev mailing list