]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
signal/powerpc: Remove unnecessary signal_code parameter of do_send_trap
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 16 Jan 2018 22:12:38 +0000 (16:12 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 23 Jan 2018 01:07:10 +0000 (19:07 -0600)
signal_code is always TRAP_HWBKPT

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/powerpc/include/asm/debug.h
arch/powerpc/kernel/process.c
arch/powerpc/kernel/traps.c

index 14e71ff6579e3354633c0f69c72d7cb3b5d412ef..fc97404de0a32a243d20dcb7e8ccea858864a33f 100644 (file)
@@ -49,7 +49,7 @@ void set_breakpoint(struct arch_hw_breakpoint *brk);
 void __set_breakpoint(struct arch_hw_breakpoint *brk);
 #ifdef CONFIG_PPC_ADV_DEBUG_REGS
 extern void do_send_trap(struct pt_regs *regs, unsigned long address,
-                        unsigned long error_code, int signal_code, int brkpt);
+                        unsigned long error_code, int brkpt);
 #else
 
 extern void do_break(struct pt_regs *regs, unsigned long address,
index 72be0c32e902a35fa45e5ed02036df91999dda58..bfb48cf56bc3f4cf9d25fc3090d9eb58dfe9150e 100644 (file)
@@ -601,11 +601,11 @@ EXPORT_SYMBOL(flush_all_to_thread);
 
 #ifdef CONFIG_PPC_ADV_DEBUG_REGS
 void do_send_trap(struct pt_regs *regs, unsigned long address,
-                 unsigned long error_code, int signal_code, int breakpt)
+                 unsigned long error_code, int breakpt)
 {
        siginfo_t info;
 
-       current->thread.trap_nr = signal_code;
+       current->thread.trap_nr = TRAP_HWBKPT;
        if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code,
                        11, SIGSEGV) == NOTIFY_STOP)
                return;
@@ -613,7 +613,7 @@ void do_send_trap(struct pt_regs *regs, unsigned long address,
        /* Deliver the signal to userspace */
        info.si_signo = SIGTRAP;
        info.si_errno = breakpt;        /* breakpoint or watchpoint id */
-       info.si_code = signal_code;
+       info.si_code = TRAP_HWBKPT;
        info.si_addr = (void __user *)address;
        force_sig_info(SIGTRAP, &info, current);
 }
index f2e6e1838952b28ed3f037bc38799db9740a2a35..c93f1e6a9fff9359749a429aca067a59b4edc5c8 100644 (file)
@@ -1750,34 +1750,34 @@ static void handle_debug(struct pt_regs *regs, unsigned long debug_status)
 #ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
                current->thread.debug.dbcr2 &= ~DBCR2_DAC12MODE;
 #endif
-               do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, TRAP_HWBKPT,
+               do_send_trap(regs, mfspr(SPRN_DAC1), debug_status,
                             5);
                changed |= 0x01;
        }  else if (debug_status & (DBSR_DAC2R | DBSR_DAC2W)) {
                dbcr_dac(current) &= ~(DBCR_DAC2R | DBCR_DAC2W);
-               do_send_trap(regs, mfspr(SPRN_DAC2), debug_status, TRAP_HWBKPT,
+               do_send_trap(regs, mfspr(SPRN_DAC2), debug_status,
                             6);
                changed |= 0x01;
        }  else if (debug_status & DBSR_IAC1) {
                current->thread.debug.dbcr0 &= ~DBCR0_IAC1;
                dbcr_iac_range(current) &= ~DBCR_IAC12MODE;
-               do_send_trap(regs, mfspr(SPRN_IAC1), debug_status, TRAP_HWBKPT,
+               do_send_trap(regs, mfspr(SPRN_IAC1), debug_status,
                             1);
                changed |= 0x01;
        }  else if (debug_status & DBSR_IAC2) {
                current->thread.debug.dbcr0 &= ~DBCR0_IAC2;
-               do_send_trap(regs, mfspr(SPRN_IAC2), debug_status, TRAP_HWBKPT,
+               do_send_trap(regs, mfspr(SPRN_IAC2), debug_status,
                             2);
                changed |= 0x01;
        }  else if (debug_status & DBSR_IAC3) {
                current->thread.debug.dbcr0 &= ~DBCR0_IAC3;
                dbcr_iac_range(current) &= ~DBCR_IAC34MODE;
-               do_send_trap(regs, mfspr(SPRN_IAC3), debug_status, TRAP_HWBKPT,
+               do_send_trap(regs, mfspr(SPRN_IAC3), debug_status,
                             3);
                changed |= 0x01;
        }  else if (debug_status & DBSR_IAC4) {
                current->thread.debug.dbcr0 &= ~DBCR0_IAC4;
-               do_send_trap(regs, mfspr(SPRN_IAC4), debug_status, TRAP_HWBKPT,
+               do_send_trap(regs, mfspr(SPRN_IAC4), debug_status,
                             4);
                changed |= 0x01;
        }