Skip to content

Commit

Permalink
MIPS: fix kernel_stack_pointer()
Browse files Browse the repository at this point in the history
MIPS always save kernel stack pointer in regs[29]

Signed-off-by: Huang Pei <huangpei@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  • Loading branch information
Huang Pei authored and Thomas Bogendoerfer committed Feb 3, 2021
1 parent 198688e commit a78ddac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/include/asm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct pt_regs {

static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)
{
return regs->regs[31];
return regs->regs[29];
}

static inline void instruction_pointer_set(struct pt_regs *regs,
Expand Down

0 comments on commit a78ddac

Please sign in to comment.