--- zzzz-none-000/linux-3.10.107/arch/mips/include/asm/ptrace.h 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/arch/mips/include/asm/ptrace.h 2021-11-10 11:53:54.000000000 +0000 @@ -33,13 +33,22 @@ unsigned long cp0_status; unsigned long hi; unsigned long lo; +#ifdef __mips_dsp + unsigned long ac1hi; + unsigned long ac1lo; + unsigned long ac2hi; + unsigned long ac2lo; + unsigned long ac3hi; + unsigned long ac3lo; + unsigned long dspctrl; +#endif /* __mips_dsp */ #ifdef CONFIG_CPU_HAS_SMARTMIPS unsigned long acx; #endif unsigned long cp0_badvaddr; unsigned long cp0_cause; unsigned long cp0_epc; -#ifdef CONFIG_MIPS_MT_SMTC +#if defined(CONFIG_MIPS_MT_SMTC) || defined(CONFIG_MIPS_MT_SMP) unsigned long cp0_tcstatus; #endif /* CONFIG_MIPS_MT_SMTC */ #ifdef CONFIG_CPU_CAVIUM_OCTEON @@ -81,9 +90,8 @@ #define instruction_pointer(regs) ((regs)->cp0_epc) #define profile_pc(regs) instruction_pointer(regs) -#define user_stack_pointer(r) ((r)->regs[29]) -extern asmlinkage void syscall_trace_enter(struct pt_regs *regs); +extern asmlinkage long syscall_trace_enter(struct pt_regs *regs, long syscall); extern asmlinkage void syscall_trace_leave(struct pt_regs *regs); extern void die(const char *, struct pt_regs *) __noreturn; @@ -100,4 +108,17 @@ (struct pt_regs *)((sp | (THREAD_SIZE - 1)) + 1 - 32) - 1; \ }) +/* Helpers for working with the user stack pointer */ + +static inline unsigned long user_stack_pointer(struct pt_regs *regs) +{ + return regs->regs[29]; +} + +static inline void user_stack_pointer_set(struct pt_regs *regs, + unsigned long val) +{ + regs->regs[29] = val; +} + #endif /* _ASM_PTRACE_H */