From: Michael Neuling Date: Tue, 27 Mar 2018 04:37:19 +0000 (+1100) Subject: powerpc: Update xmon to use ppc_breakpoint_available() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9bc2bd5d9d8d3eddf410075e2eea70bb493dfa26;p=openwrt%2Fstaging%2Fblogic.git 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 [mpe: Unsplit quoted string] Signed-off-by: Michael Ellerman --- 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')