aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2014-12-01 00:54:13 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2014-12-01 22:23:04 -0500
commitabb90ee7bca5af977b90a0c6be44f631fdacc932 (patch)
tree4b0be34055810c84bcbbf5858d409fc31f6eae74
parent1ad7d70562eeb14df8b6d3e1a0a56f1bdfb990f7 (diff)
powerpc/xmon: Cleanup the breakpoint flags
Drop BP_IABR_TE, which though used, does not do anything useful. Rename BP_IABR to BP_CIABR. Renumber the flags. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/xmon/xmon.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 820dc135f040..dfe337238699 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -94,10 +94,9 @@ struct bpt {
94}; 94};
95 95
96/* Bits in bpt.enabled */ 96/* Bits in bpt.enabled */
97#define BP_IABR_TE 1 /* IABR translation enabled */ 97#define BP_CIABR 1
98#define BP_IABR 2 98#define BP_TRAP 2
99#define BP_TRAP 8 99#define BP_DABR 4
100#define BP_DABR 0x10
101 100
102#define NBPTS 256 101#define NBPTS 256
103static struct bpt bpts[NBPTS]; 102static struct bpt bpts[NBPTS];
@@ -772,7 +771,7 @@ static void insert_bpts(void)
772 771
773 bp = bpts; 772 bp = bpts;
774 for (i = 0; i < NBPTS; ++i, ++bp) { 773 for (i = 0; i < NBPTS; ++i, ++bp) {
775 if ((bp->enabled & (BP_TRAP|BP_IABR)) == 0) 774 if ((bp->enabled & (BP_TRAP|BP_CIABR)) == 0)
776 continue; 775 continue;
777 if (mread(bp->address, &bp->instr[0], 4) != 4) { 776 if (mread(bp->address, &bp->instr[0], 4) != 4) {
778 printf("Couldn't read instruction at %lx, " 777 printf("Couldn't read instruction at %lx, "
@@ -787,7 +786,7 @@ static void insert_bpts(void)
787 continue; 786 continue;
788 } 787 }
789 store_inst(&bp->instr[0]); 788 store_inst(&bp->instr[0]);
790 if (bp->enabled & BP_IABR) 789 if (bp->enabled & BP_CIABR)
791 continue; 790 continue;
792 if (mwrite(bp->address, &bpinstr, 4) != 4) { 791 if (mwrite(bp->address, &bpinstr, 4) != 4) {
793 printf("Couldn't write instruction at %lx, " 792 printf("Couldn't write instruction at %lx, "
@@ -822,7 +821,7 @@ static void remove_bpts(void)
822 821
823 bp = bpts; 822 bp = bpts;
824 for (i = 0; i < NBPTS; ++i, ++bp) { 823 for (i = 0; i < NBPTS; ++i, ++bp) {
825 if ((bp->enabled & (BP_TRAP|BP_IABR)) != BP_TRAP) 824 if ((bp->enabled & (BP_TRAP|BP_CIABR)) != BP_TRAP)
826 continue; 825 continue;
827 if (mread(bp->address, &instr, 4) == 4 826 if (mread(bp->address, &instr, 4) == 4
828 && instr == bpinstr 827 && instr == bpinstr
@@ -1217,7 +1216,7 @@ bpt_cmds(void)
1217 break; 1216 break;
1218 } 1217 }
1219 if (iabr) { 1218 if (iabr) {
1220 iabr->enabled &= ~(BP_IABR | BP_IABR_TE); 1219 iabr->enabled &= ~BP_CIABR;
1221 iabr = NULL; 1220 iabr = NULL;
1222 } 1221 }
1223 if (!scanhex(&a)) 1222 if (!scanhex(&a))
@@ -1226,7 +1225,7 @@ bpt_cmds(void)
1226 break; 1225 break;
1227 bp = new_breakpoint(a); 1226 bp = new_breakpoint(a);
1228 if (bp != NULL) { 1227 if (bp != NULL) {
1229 bp->enabled |= BP_IABR | BP_IABR_TE; 1228 bp->enabled |= BP_CIABR;
1230 iabr = bp; 1229 iabr = bp;
1231 } 1230 }
1232 break; 1231 break;
@@ -1283,7 +1282,7 @@ bpt_cmds(void)
1283 if (!bp->enabled) 1282 if (!bp->enabled)
1284 continue; 1283 continue;
1285 printf("%2x %s ", BP_NUM(bp), 1284 printf("%2x %s ", BP_NUM(bp),
1286 (bp->enabled & BP_IABR)? "inst": "trap"); 1285 (bp->enabled & BP_CIABR) ? "inst": "trap");
1287 xmon_print_symbol(bp->address, " ", "\n"); 1286 xmon_print_symbol(bp->address, " ", "\n");
1288 } 1287 }
1289 break; 1288 break;