aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/mips/kernel/traps.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index ab77034921c4..e51d8fd9a152 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -161,16 +161,20 @@ static void show_stacktrace(struct task_struct *task, struct pt_regs *regs)
161static __always_inline void prepare_frametrace(struct pt_regs *regs) 161static __always_inline void prepare_frametrace(struct pt_regs *regs)
162{ 162{
163 __asm__ __volatile__( 163 __asm__ __volatile__(
164 "1: la $2, 1b\n\t" 164 ".set push\n\t"
165 ".set noat\n\t"
165#ifdef CONFIG_64BIT 166#ifdef CONFIG_64BIT
166 "sd $2, %0\n\t" 167 "1: dla $1, 1b\n\t"
168 "sd $1, %0\n\t"
167 "sd $29, %1\n\t" 169 "sd $29, %1\n\t"
168 "sd $31, %2\n\t" 170 "sd $31, %2\n\t"
169#else 171#else
170 "sw $2, %0\n\t" 172 "1: la $1, 1b\n\t"
173 "sw $1, %0\n\t"
171 "sw $29, %1\n\t" 174 "sw $29, %1\n\t"
172 "sw $31, %2\n\t" 175 "sw $31, %2\n\t"
173#endif 176#endif
177 ".set pop\n\t"
174 : "=m" (regs->cp0_epc), 178 : "=m" (regs->cp0_epc),
175 "=m" (regs->regs[29]), "=m" (regs->regs[31]) 179 "=m" (regs->regs[29]), "=m" (regs->regs[31])
176 : : "memory"); 180 : : "memory");