signal/powerpc: Remove unnecessary signal_code parameter of do_send_trap

signal_code is always TRAP_HWBKPT
Signed-off-by: N"Eric W. Biederman" <ebiederm@xmission.com>
上级 38246735
...@@ -49,7 +49,7 @@ void set_breakpoint(struct arch_hw_breakpoint *brk); ...@@ -49,7 +49,7 @@ void set_breakpoint(struct arch_hw_breakpoint *brk);
void __set_breakpoint(struct arch_hw_breakpoint *brk); void __set_breakpoint(struct arch_hw_breakpoint *brk);
#ifdef CONFIG_PPC_ADV_DEBUG_REGS #ifdef CONFIG_PPC_ADV_DEBUG_REGS
extern void do_send_trap(struct pt_regs *regs, unsigned long address, 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 #else
extern void do_break(struct pt_regs *regs, unsigned long address, extern void do_break(struct pt_regs *regs, unsigned long address,
......
...@@ -601,11 +601,11 @@ EXPORT_SYMBOL(flush_all_to_thread); ...@@ -601,11 +601,11 @@ EXPORT_SYMBOL(flush_all_to_thread);
#ifdef CONFIG_PPC_ADV_DEBUG_REGS #ifdef CONFIG_PPC_ADV_DEBUG_REGS
void do_send_trap(struct pt_regs *regs, unsigned long address, 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; 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, if (notify_die(DIE_DABR_MATCH, "dabr_match", regs, error_code,
11, SIGSEGV) == NOTIFY_STOP) 11, SIGSEGV) == NOTIFY_STOP)
return; return;
...@@ -613,7 +613,7 @@ void do_send_trap(struct pt_regs *regs, unsigned long address, ...@@ -613,7 +613,7 @@ void do_send_trap(struct pt_regs *regs, unsigned long address,
/* Deliver the signal to userspace */ /* Deliver the signal to userspace */
info.si_signo = SIGTRAP; info.si_signo = SIGTRAP;
info.si_errno = breakpt; /* breakpoint or watchpoint id */ info.si_errno = breakpt; /* breakpoint or watchpoint id */
info.si_code = signal_code; info.si_code = TRAP_HWBKPT;
info.si_addr = (void __user *)address; info.si_addr = (void __user *)address;
force_sig_info(SIGTRAP, &info, current); force_sig_info(SIGTRAP, &info, current);
} }
......
...@@ -1750,34 +1750,34 @@ static void handle_debug(struct pt_regs *regs, unsigned long debug_status) ...@@ -1750,34 +1750,34 @@ static void handle_debug(struct pt_regs *regs, unsigned long debug_status)
#ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE #ifdef CONFIG_PPC_ADV_DEBUG_DAC_RANGE
current->thread.debug.dbcr2 &= ~DBCR2_DAC12MODE; current->thread.debug.dbcr2 &= ~DBCR2_DAC12MODE;
#endif #endif
do_send_trap(regs, mfspr(SPRN_DAC1), debug_status, TRAP_HWBKPT, do_send_trap(regs, mfspr(SPRN_DAC1), debug_status,
5); 5);
changed |= 0x01; changed |= 0x01;
} else if (debug_status & (DBSR_DAC2R | DBSR_DAC2W)) { } else if (debug_status & (DBSR_DAC2R | DBSR_DAC2W)) {
dbcr_dac(current) &= ~(DBCR_DAC2R | DBCR_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); 6);
changed |= 0x01; changed |= 0x01;
} else if (debug_status & DBSR_IAC1) { } else if (debug_status & DBSR_IAC1) {
current->thread.debug.dbcr0 &= ~DBCR0_IAC1; current->thread.debug.dbcr0 &= ~DBCR0_IAC1;
dbcr_iac_range(current) &= ~DBCR_IAC12MODE; 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); 1);
changed |= 0x01; changed |= 0x01;
} else if (debug_status & DBSR_IAC2) { } else if (debug_status & DBSR_IAC2) {
current->thread.debug.dbcr0 &= ~DBCR0_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); 2);
changed |= 0x01; changed |= 0x01;
} else if (debug_status & DBSR_IAC3) { } else if (debug_status & DBSR_IAC3) {
current->thread.debug.dbcr0 &= ~DBCR0_IAC3; current->thread.debug.dbcr0 &= ~DBCR0_IAC3;
dbcr_iac_range(current) &= ~DBCR_IAC34MODE; 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); 3);
changed |= 0x01; changed |= 0x01;
} else if (debug_status & DBSR_IAC4) { } else if (debug_status & DBSR_IAC4) {
current->thread.debug.dbcr0 &= ~DBCR0_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); 4);
changed |= 0x01; changed |= 0x01;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部