diff options
author | Tiejun Chen <tiejun.chen@windriver.com> | 2012-08-22 12:10:19 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-08-24 06:26:05 -0400 |
commit | 949616cf2d3095d1bb6b3d155c1cc963abd98b5c (patch) | |
tree | d43c1516a726aff6a7d53d081e89fab03a09d4ca /arch/powerpc/kernel/kgdb.c | |
parent | 572b411cb4f1b208bb8ea278752f956b3554371e (diff) |
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 <tiejun.chen@windriver.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/kgdb.c')
-rw-r--r-- | arch/powerpc/kernel/kgdb.c | 15 |
1 files changed, 15 insertions, 0 deletions
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) | |||
101 | return SIGHUP; /* default for things we don't know about */ | 101 | return SIGHUP; /* default for things we don't know about */ |
102 | } | 102 | } |
103 | 103 | ||
104 | /** | ||
105 | * | ||
106 | * kgdb_skipexception - Bail out of KGDB when we've been triggered. | ||
107 | * @exception: Exception vector number | ||
108 | * @regs: Current &struct pt_regs. | ||
109 | * | ||
110 | * On some architectures we need to skip a breakpoint exception when | ||
111 | * it occurs after a breakpoint has been removed. | ||
112 | * | ||
113 | */ | ||
114 | int kgdb_skipexception(int exception, struct pt_regs *regs) | ||
115 | { | ||
116 | return kgdb_isremovedbreak(regs->nip); | ||
117 | } | ||
118 | |||
104 | static int kgdb_call_nmi_hook(struct pt_regs *regs) | 119 | static int kgdb_call_nmi_hook(struct pt_regs *regs) |
105 | { | 120 | { |
106 | kgdb_nmicallback(raw_smp_processor_id(), regs); | 121 | kgdb_nmicallback(raw_smp_processor_id(), regs); |