diff options
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/cpu-probe.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/irixsig.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/scall32-o32.S | 18 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-64.S | 18 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-n32.S | 4 | ||||
-rw-r--r-- | arch/mips/kernel/scall64-o32.S | 4 | ||||
-rw-r--r-- | arch/mips/kernel/signal.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/signal32.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 5 |
9 files changed, 19 insertions, 42 deletions
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index a263fb7a3971..5e1b08b00a33 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c @@ -417,7 +417,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c) case PRID_IMP_R10000: c->cputype = CPU_R10000; c->isa_level = MIPS_CPU_ISA_IV; - c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | + c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX | MIPS_CPU_FPU | MIPS_CPU_32FPR | MIPS_CPU_COUNTER | MIPS_CPU_WATCH | MIPS_CPU_LLSC; @@ -426,7 +426,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c) case PRID_IMP_R12000: c->cputype = CPU_R12000; c->isa_level = MIPS_CPU_ISA_IV; - c->options = MIPS_CPU_TLB | MIPS_CPU_4KEX | + c->options = MIPS_CPU_TLB | MIPS_CPU_4K_CACHE | MIPS_CPU_4KEX | MIPS_CPU_FPU | MIPS_CPU_32FPR | MIPS_CPU_COUNTER | MIPS_CPU_WATCH | MIPS_CPU_LLSC; diff --git a/arch/mips/kernel/irixsig.c b/arch/mips/kernel/irixsig.c index dd118c60bcd0..08273a2a501d 100644 --- a/arch/mips/kernel/irixsig.c +++ b/arch/mips/kernel/irixsig.c @@ -279,8 +279,6 @@ irix_sigreturn(struct pt_regs *regs) /* * Don't let your children do this ... */ - if (current_thread_info()->flags & TIF_SYSCALL_TRACE) - do_syscall_trace(regs, 1); __asm__ __volatile__( "move\t$29,%0\n\t" "j\tsyscall_exit" @@ -783,8 +781,6 @@ asmlinkage void irix_setcontext(struct pt_regs *regs) /* * Don't let your children do this ... */ - if (current_thread_info()->flags & TIF_SYSCALL_TRACE) - do_syscall_trace(regs, 1); __asm__ __volatile__( "move\t$29,%0\n\t" "j\tsyscall_exit" diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S index 4dd8e8b4fbc2..a42e0e8caa7b 100644 --- a/arch/mips/kernel/scall32-o32.S +++ b/arch/mips/kernel/scall32-o32.S @@ -94,11 +94,13 @@ syscall_trace_entry: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC lw a0, PT_R4(sp) # Restore argument registers lw a1, PT_R5(sp) lw a2, PT_R6(sp) lw a3, PT_R7(sp) - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 @@ -241,19 +243,7 @@ illegal_syscall: sw zero, PT_R7(sp) # success sw v0, PT_R2(sp) # result - /* Success, so skip usual error handling garbage. */ - lw a2, TI_FLAGS($28) # syscall tracing enabled? - li t0, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT - and t0, a2, t0 - bnez t0, 1f - - j o32_syscall_exit - -1: SAVE_STATIC - move a0, sp - li a1, 1 - jal do_syscall_trace - j syscall_exit + j o32_syscall_exit # continue like a normal syscall no_mem: li v0, -ENOMEM jr ra diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S index 9085838d6ce3..47bfbd416709 100644 --- a/arch/mips/kernel/scall64-64.S +++ b/arch/mips/kernel/scall64-64.S @@ -93,13 +93,15 @@ syscall_trace_entry: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC ld a0, PT_R4(sp) # Restore argument registers ld a1, PT_R5(sp) ld a2, PT_R6(sp) ld a3, PT_R7(sp) ld a4, PT_R8(sp) ld a5, PT_R9(sp) - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 @@ -174,19 +176,7 @@ illegal_syscall: sd zero, PT_R7(sp) # success sd v0, PT_R2(sp) # result - /* Success, so skip usual error handling garbage. */ - li t0, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT - LONG_L a2, TI_FLAGS($28) # syscall tracing enabled? - and t0, a2, t0 - bnez t0, 1f - - j n64_syscall_exit - -1: SAVE_STATIC - move a0, sp - li a1, 1 - jal do_syscall_trace - j syscall_exit + j n64_syscall_exit # continue like a normal syscall no_mem: li v0, -ENOMEM jr ra diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S index 7e66eb823bf6..b465ced1758f 100644 --- a/arch/mips/kernel/scall64-n32.S +++ b/arch/mips/kernel/scall64-n32.S @@ -90,13 +90,15 @@ n32_syscall_trace_entry: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC ld a0, PT_R4(sp) # Restore argument registers ld a1, PT_R5(sp) ld a2, PT_R6(sp) ld a3, PT_R7(sp) ld a4, PT_R8(sp) ld a5, PT_R9(sp) - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S index 5a16401e443a..3d338ca7eeeb 100644 --- a/arch/mips/kernel/scall64-o32.S +++ b/arch/mips/kernel/scall64-o32.S @@ -124,6 +124,8 @@ trace_a_syscall: li a1, 0 jal do_syscall_trace + move t0, s0 + RESTORE_STATIC ld a0, PT_R4(sp) # Restore argument registers ld a1, PT_R5(sp) ld a2, PT_R6(sp) @@ -132,7 +134,7 @@ trace_a_syscall: ld a5, PT_R9(sp) ld a6, PT_R10(sp) ld a7, PT_R11(sp) # For indirect syscalls - jalr s0 + jalr t0 li t0, -EMAXERRNO - 1 # error? sltu t0, t0, v0 diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c index 05e09eedabff..7d1800fe7038 100644 --- a/arch/mips/kernel/signal.c +++ b/arch/mips/kernel/signal.c @@ -220,8 +220,6 @@ _sys_sigreturn(nabi_no_regargs struct pt_regs regs) /* * Don't let your children do this ... */ - if (current_thread_info()->flags & TIF_SYSCALL_TRACE) - do_syscall_trace(®s, 1); __asm__ __volatile__( "move\t$29, %0\n\t" "j\tsyscall_exit" diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index e315d3f6aa6e..c856dbc52abb 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c @@ -497,8 +497,6 @@ _sys32_sigreturn(nabi_no_regargs struct pt_regs regs) /* * Don't let your children do this ... */ - if (current_thread_info()->flags & TIF_SYSCALL_TRACE) - do_syscall_trace(®s, 1); __asm__ __volatile__( "move\t$29, %0\n\t" "j\tsyscall_exit" diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 6f3ff9690686..7058893d5ad2 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -534,13 +534,14 @@ static inline int simulate_rdhwr(struct pt_regs *regs) switch (rd) { case 29: regs->regs[rt] = ti->tp_value; - break; + return 0; default: return -EFAULT; } } - return 0; + /* Not ours. */ + return -EFAULT; } asmlinkage void do_ov(struct pt_regs *regs) |