[PATCH v3 3/8] powerpc: Update xmon to use ppc_breakpoint_available()
Michael Neuling
mikey at neuling.org
Tue Mar 27 15:37:19 AEDT 2018
The 'bd' command will now print an error and not set the breakpoint on
P9.
Signed-off-by: Michael Neuling <mikey at neuling.org>
---
arch/powerpc/xmon/xmon.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index a06cf6e389..047a682c6d 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1302,6 +1302,11 @@ 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')
--
2.14.1
More information about the Linuxppc-dev
mailing list