aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/inst.h
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/include/asm/inst.h
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/include/asm/inst.h')
-rw-r--r--arch/powerpc/include/asm/inst.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/inst.h b/arch/powerpc/include/asm/inst.h
index ff2c8fe3e262..ff8d58671648 100644
--- a/arch/powerpc/include/asm/inst.h
+++ b/arch/powerpc/include/asm/inst.h
@@ -23,4 +23,9 @@ static inline u32 ppc_inst_swab(u32 x)
return ppc_inst(swab32(ppc_inst_val(x)));
}
+static inline bool ppc_inst_equal(u32 x, u32 y)
+{
+ return x == y;
+}
+
#endif /* _ASM_POWERPC_INST_H */