From: Tiejun Chen Date: Wed, 22 Aug 2012 16:10:19 +0000 (+0000) Subject: powerpc/kgdb: Bail out of KGDB when we've been triggered X-Git-Tag: MMI-PSA29.97-13-9~16072^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=949616cf2d3095d1bb6b3d155c1cc963abd98b5c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git powerpc/kgdb: Bail out of KGDB when we've been triggered We need to skip a breakpoint exception when it occurs after a breakpoint has already been removed. Signed-off-by: Tiejun Chen Signed-off-by: Benjamin Herrenschmidt --- diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c index bbabc5abb1c4..05adb69febf4 100644 --- a/arch/powerpc/kernel/kgdb.c +++ b/arch/powerpc/kernel/kgdb.c @@ -101,6 +101,21 @@ static int computeSignal(unsigned int tt) return SIGHUP; /* default for things we don't know about */ } +/** + * + * kgdb_skipexception - Bail out of KGDB when we've been triggered. + * @exception: Exception vector number + * @regs: Current &struct pt_regs. + * + * On some architectures we need to skip a breakpoint exception when + * it occurs after a breakpoint has been removed. + * + */ +int kgdb_skipexception(int exception, struct pt_regs *regs) +{ + return kgdb_isremovedbreak(regs->nip); +} + static int kgdb_call_nmi_hook(struct pt_regs *regs) { kgdb_nmicallback(raw_smp_processor_id(), regs);