aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/xmon
diff options
context:
space:
mode:
authorJordan Niethe <jniethe5@gmail.com>2020-05-06 13:40:30 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-05-19 00:10:37 +1000
commit217862d9b98bf08958d57fd7b31b9de0f1a9477d (patch)
treeb5cfb7b7b399d667c856076899c5bb85e0587d0b /arch/powerpc/xmon
parentpowerpc: Use a function for byte swapping instructions (diff)
downloadlinux-dev-217862d9b98bf08958d57fd7b31b9de0f1a9477d.tar.xz
linux-dev-217862d9b98bf08958d57fd7b31b9de0f1a9477d.zip
powerpc: Introduce functions for instruction equality
In preparation for an instruction data type that can not be directly used with the '==' operator use functions for checking equality. Signed-off-by: Jordan Niethe <jniethe5@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Balamuruhan S <bala24@linux.ibm.com> Link: https://lore.kernel.org/r/20200506034050.24806-11-jniethe5@gmail.com
Diffstat (limited to 'arch/powerpc/xmon')
-rw-r--r--arch/powerpc/xmon/xmon.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index c5e4218716e4..4cf998518047 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -947,7 +947,7 @@ static void remove_bpts(void)
if ((bp->enabled & (BP_TRAP|BP_CIABR)) != BP_TRAP)
continue;
if (mread(bp->address, &instr, 4) == 4
- && instr == ppc_inst(bpinstr)
+ && ppc_inst_equal(instr, ppc_inst(bpinstr))
&& patch_instruction(
(unsigned int *)bp->address, bp->instr[0]) != 0)
printf("Couldn't remove breakpoint at %lx\n",
@@ -2862,7 +2862,7 @@ generic_inst_dump(unsigned long adr, long count, int praddr,
break;
}
inst = ppc_inst(GETWORD(val));
- if (adr > first_adr && inst == last_inst) {
+ if (adr > first_adr && ppc_inst_equal(inst, last_inst)) {
if (!dotted) {
printf(" ...\n");
dotted = 1;