[PATCH] xmon breakpoints fix for Power4/5
Jake Moilanen
moilanen at austin.ibm.com
Wed Jan 5 07:30:31 EST 2005
Looks like xmon breakpoints were not working on Power4/5. Here's a fix
to the problem.
Tested on Power3 and Power5 boxes.
Jake
Signed-off-by: Jake Moilanen <moilanen at austin.ibm.com>
---
diff -puN arch/ppc64/xmon/xmon.c~xmon-lpar-bp arch/ppc64/xmon/xmon.c
--- linux-2.6-bk/arch/ppc64/xmon/xmon.c~xmon-lpar-bp Tue Jan 4 12:44:20 2005
+++ linux-2.6-bk-moilanen/arch/ppc64/xmon/xmon.c Tue Jan 4 14:13:09 2005
@@ -1088,11 +1088,6 @@ bpt_cmds(void)
break;
case 'i': /* bi - hardware instr breakpoint */
- if (!(cur_cpu_spec->cpu_features & CPU_FTR_IABR)) {
- printf("Hardware instruction breakpoint "
- "not supported on this cpu\n");
- break;
- }
if (iabr) {
iabr->enabled &= ~(BP_IABR | BP_IABR_TE);
iabr = NULL;
@@ -1101,10 +1096,15 @@ bpt_cmds(void)
break;
if (!check_bp_loc(a))
break;
+
bp = new_breakpoint(a);
- if (bp != NULL) {
+
+ if (cur_cpu_spec->cpu_features & CPU_FTR_IABR) {
bp->enabled |= BP_IABR | BP_IABR_TE;
iabr = bp;
+ } else {
+ if (bp)
+ bp->enabled |= BP_TRAP;
}
break;
_
More information about the Linuxppc64-dev
mailing list