Blob Blame History Raw
From c7dee3320695d73da184fe3e1d09fd94c9dd1177 Mon Sep 17 00:00:00 2001
From: Michael Neuling <mikey@neuling.org>
Date: Tue, 27 Mar 2018 15:37:19 +1100
Subject: [PATCH 3/9] powerpc: Update xmon to use ppc_breakpoint_available()

References: bsc#1072829
Patch-mainline: v4.17-rc1
Git-commit: 9bc2bd5d9d8d3eddf410075e2eea70bb493dfa26

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>
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
 arch/powerpc/xmon/xmon.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 96dcff1efd19..dec5406af0c2 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1270,6 +1270,10 @@ bpt_cmds(void)
 	switch (cmd) {
 #ifndef CONFIG_8xx
 	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.13.6