MIPS: Remove unused task_struct.trap_no field.
authorDavid Daney <ddaney@caviumnetworks.com>
Tue, 3 Aug 2010 21:57:39 +0000 (14:57 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 5 Aug 2010 12:26:30 +0000 (13:26 +0100)
It is initialized to zero and only ever read.  Remove it, and pass zero in
its place.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
To: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/1531/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/processor.h
arch/mips/kernel/asm-offsets.c
arch/mips/kernel/traps.c

index 24d91f8618f077174baa784b7ef7dc95ec0e7244..0d629bb93cbe1abc175ef5adcd7976e5d424d52e 100644 (file)
@@ -229,7 +229,6 @@ struct thread_struct {
        unsigned long cp0_badvaddr;     /* Last user fault */
        unsigned long cp0_baduaddr;     /* Last kernel fault accessing USEG */
        unsigned long error_code;
-       unsigned long trap_no;
        unsigned long irix_trampoline;  /* Wheee... */
        unsigned long irix_oldctx;
 #ifdef CONFIG_CPU_CAVIUM_OCTEON
@@ -301,7 +300,6 @@ struct thread_struct {
        .cp0_badvaddr           = 0,                            \
        .cp0_baduaddr           = 0,                            \
        .error_code             = 0,                            \
-       .trap_no                = 0,                            \
        .irix_trampoline        = 0,                            \
        .irix_oldctx            = 0,                            \
        /*                                                      \
index ca6c83218caa8df0c49f283593a2c2974315af2e..6b30fb2caa67170b01f3d12d1fa67e7dd0696d6c 100644 (file)
@@ -126,7 +126,6 @@ void output_thread_defines(void)
               thread.cp0_baduaddr);
        OFFSET(THREAD_ECODE, task_struct, \
               thread.error_code);
-       OFFSET(THREAD_TRAPNO, task_struct, thread.trap_no);
        OFFSET(THREAD_TRAMP, task_struct, \
               thread.irix_trampoline);
        OFFSET(THREAD_OLDCTX, task_struct, \
index 4c6079f24958a478d86a8bf2e48fef23cf9cb9db..6019e9ea9a6b3742dcaf357c2a1abf1fa329bab6 100644 (file)
@@ -376,7 +376,7 @@ void __noreturn die(const char * str, struct pt_regs * regs)
        mips_mt_regdump(dvpret);
 #endif /* CONFIG_MIPS_MT_SMTC */
 
-       if (notify_die(DIE_OOPS, str, regs, 0, current->thread.trap_no, SIGSEGV) == NOTIFY_STOP)
+       if (notify_die(DIE_OOPS, str, regs, 0, 0, SIGSEGV) == NOTIFY_STOP)
                sig = 0;
 
        printk("%s[#%d]:\n", str, ++die_counter);