Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 949616cf authored by Tiejun Chen's avatar Tiejun Chen Committed by Benjamin Herrenschmidt
Browse files

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: default avatarTiejun Chen <tiejun.chen@windriver.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 572b411c
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -101,6 +101,21 @@ static int computeSignal(unsigned int tt)
	return SIGHUP;		/* default for things we don't know about */
	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)
static int kgdb_call_nmi_hook(struct pt_regs *regs)
{
{
	kgdb_nmicallback(raw_smp_processor_id(), regs);
	kgdb_nmicallback(raw_smp_processor_id(), regs);