powerpc/watchpoint/xmon: Don't allow breakpoint overwriting

Xmon allows overwriting breakpoints because it's supported by only
one DAWR. But with multiple DAWRs, overwriting becomes ambiguous
or unnecessary complicated. So let's not allow it.

Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Michael Neuling <mikey@neuling.org>
Link: https://lore.kernel.org/r/20200514111741.97993-16-ravi.bangoria@linux.ibm.com
This commit is contained in:
Ravi Bangoria 2020-05-14 16:47:40 +05:30 committed by Michael Ellerman
parent 29da4f91c0
commit 514db915e7
1 changed files with 4 additions and 0 deletions

View File

@ -1399,6 +1399,10 @@ bpt_cmds(void)
printf("Hardware data breakpoint not supported on this cpu\n");
break;
}
if (dabr.enabled) {
printf("Couldn't find free breakpoint register\n");
break;
}
mode = 7;
cmd = inchar();
if (cmd == 'r')