summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHuang Pei <huangpei@loongson.cn>2021-01-29 12:35:07 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-02-03 11:32:52 +0100
commita78ddac1bc22bd7a47fbec06c9c4ef4312ba71cf (patch)
tree6f5b8b46b6a2211162b3a938e06ff8ca6156e3ba /arch
parent198688edbf77c6fc0e65f5d062f810d83d090166 (diff)
MIPS: fix kernel_stack_pointer()
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/include/asm/ptrace.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index 1e76774b36dd..daf3cf244ea9 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -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,