OSDN Git Service

powerpc: Update xmon to use ppc_breakpoint_available()
authorMichael Neuling <mikey@neuling.org>
Tue, 27 Mar 2018 04:37:19 +0000 (15:37 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 27 Mar 2018 12:55:11 +0000 (23:55 +1100)
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>
arch/powerpc/xmon/xmon.c

index 82e1a3e..b481f9f 100644 (file)
@@ -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')