Skip to content
  • Christophe Leroy's avatar
    0e63f015
    powerpc: Add current_stack_pointer as a register global · 0e63f015
    Christophe Leroy authored
    
    
    current_stack_frame() doesn't return the stack pointer, but the
    caller's stack frame. See commit bfe9a2cfe91a ("powerpc: Reimplement
    __get_SP() as a function not a define") and commit
    acf620ecf56c ("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: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
    [mpe: Split out of other patch, tweak change log]
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20200220115141.2707-2-mpe@ellerman.id.au
    0e63f015
    powerpc: Add current_stack_pointer as a register global
    Christophe Leroy authored
    
    
    current_stack_frame() doesn't return the stack pointer, but the
    caller's stack frame. See commit bfe9a2cfe91a ("powerpc: Reimplement
    __get_SP() as a function not a define") and commit
    acf620ecf56c ("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: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
    [mpe: Split out of other patch, tweak change log]
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    Link: https://lore.kernel.org/r/20200220115141.2707-2-mpe@ellerman.id.au
Loading