sh64: Kill off unused trap_no/error_code from thread_struct.
authorPaul Mundt <lethal@linux-sh.org>
Thu, 19 Apr 2012 08:52:20 +0000 (17:52 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Thu, 19 Apr 2012 08:52:20 +0000 (17:52 +0900)
While the trap number and error code are passed around for debugging
purposes, this occurs wholly independently of the thread struct values.
These values were never part of the sigcontext ABI and are thus never
passed anywhere, so we can just kill them off across the board.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/processor_64.h
arch/sh/kernel/cpu/sh5/fpu.c
arch/sh/kernel/traps_64.c
arch/sh/mm/tlbflush_64.c

index e25c4c7d6b63171221e247cea5f6ee45136efaf7..740e268765963b9c91dcce4d4b204be0aeeceea2 100644 (file)
@@ -121,7 +121,6 @@ struct thread_struct {
           NULL for a kernel thread. */
        struct pt_regs *uregs;
 
-       unsigned long trap_no, error_code;
        unsigned long address;
        /* Hardware debugging registers may come here */
 
@@ -138,8 +137,6 @@ struct thread_struct {
        .pc             = 0,                    \
         .kregs         = &fake_swapper_regs,   \
        .uregs          = NULL,                 \
-       .trap_no        = 0,                    \
-       .error_code     = 0,                    \
        .address        = 0,                    \
        .flags          = 0,                    \
 }
index 4b3bb35e99f3701db410d641d810d929ba853677..9f8713aa7184f3b4da3ad9ea46f8a1d629362eaf 100644 (file)
@@ -107,8 +107,5 @@ asmlinkage void do_fpu_error(unsigned long ex, struct pt_regs *regs)
 
        regs->pc += 4;
 
-       tsk->thread.trap_no = 11;
-       tsk->thread.error_code = 0;
-
        force_sig(SIGFPE, tsk);
 }
index 6c0486094e48cd074a4fd43cb59ea4db9bd8769c..8dae93ed8aff77586c50df0f6830e23f48f13c75 100644 (file)
@@ -283,8 +283,6 @@ static void do_unhandled_exception(int trapnr, int signr, char *str, char *fn_na
                unsigned long error_code, struct pt_regs *regs, struct task_struct *tsk)
 {
        show_excp_regs(fn_name, trapnr, signr, regs);
-       tsk->thread.error_code = error_code;
-       tsk->thread.trap_no = trapnr;
 
        if (user_mode(regs))
                force_sig(signr, tsk);
index 605dc65dc66d1c269bfb961401bb10e0c903c7da..be01f92f8c89b90063dd02b749498a9bba6fdbda 100644 (file)
@@ -213,7 +213,6 @@ bad_area:
                        panic("INIT had user mode bad_area\n");
                }
                tsk->thread.address = address;
-               tsk->thread.error_code = writeaccess;
                info.si_signo = SIGSEGV;
                info.si_errno = 0;
                info.si_addr = (void *) address;
@@ -263,8 +262,6 @@ do_sigbus:
         * or user mode.
         */
        tsk->thread.address = address;
-       tsk->thread.error_code = writeaccess;
-       tsk->thread.trap_no = 14;
        force_sig(SIGBUS, tsk);
 
        /* Kernel mode? Handle exceptions or die */