]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc, hw_breakpoint: Enable hw-breakpoints while handling intervening signals
authorK.Prasad <prasad@linux.vnet.ibm.com>
Tue, 15 Jun 2010 06:05:41 +0000 (11:35 +0530)
committerPaul Mackerras <paulus@samba.org>
Tue, 22 Jun 2010 09:40:50 +0000 (19:40 +1000)
commit06532a6743d83fac4b79389fc8c86c88cb4e3302
tree2ca694f5cb71a2296c6b4e0b36f3ddd6e2033084
parent2538c2d08f46141550a1e68819efa8fe31c6e3dc
powerpc, hw_breakpoint: Enable hw-breakpoints while handling intervening signals

A signal delivered between a hw_breakpoint_handler() and the
single_step_dabr_instruction() will not have the breakpoint active
while the signal handler is running -- the signal delivery will
set up a new MSR value which will not have MSR_SE set, so we
won't get the signal step interrupt until and unless the signal
handler returns (which it may never do).

To fix this, we restore the breakpoint when delivering a signal --
we clear the MSR_SE bit and set the DABR again.  If the signal
handler returns, the DABR interrupt will occur again when the
instruction that we were originally trying to single-step gets
re-executed.

[Paul Mackerras <paulus@samba.org> pointed out the need to do this.]

Signed-off-by: K.Prasad <prasad@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/include/asm/hw_breakpoint.h
arch/powerpc/kernel/hw_breakpoint.c
arch/powerpc/kernel/signal.c