summaryrefslogtreecommitdiff
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2018-03-27 15:37:19 +1100
committerMichael Ellerman <mpe@ellerman.id.au>2018-03-27 23:55:11 +1100
commit9bc2bd5d9d8d3eddf410075e2eea70bb493dfa26 (patch)
treead03637f1eb84cd527bdfa354f88a97e5bb35e91 /arch/powerpc/xmon
parent85ce9a5d57bec126d19610d6e77f9e6e4eaea635 (diff)
powerpc: Update xmon to use ppc_breakpoint_available()
The 'bd' command will now print an error and not set the breakpoint on P9. Signed-off-by: Michael Neuling <mikey@neuling.org> [mpe: Unsplit quoted string] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 82e1a3ee6e0f..b481f9f48489 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1297,6 +1297,10 @@ bpt_cmds(void)
static const char badaddr[] = "Only kernel addresses are permitted for breakpoints\n";
int mode;
case 'd': /* bd - hardware data breakpoint */
+ if (!ppc_breakpoint_available()) {
+ printf("Hardware data breakpoint not supported on this cpu\n");
+ break;
+ }
mode = 7;
cmd = inchar();
if (cmd == 'r')