summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/lib
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2021-12-02 13:00:25 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2021-12-23 22:36:58 +1100
commit31acc599564120fa41f9df2c567842d003728dab (patch)
tree00af6e765385c0640034fc1d5da0960f618e9547 /arch/powerpc/lib
parent29562a9da29478834e57f81e3804e9ec7a6b350b (diff)
downloadlinux-stable-31acc599564120fa41f9df2c567842d003728dab.tar.gz
linux-stable-31acc599564120fa41f9df2c567842d003728dab.tar.bz2
linux-stable-31acc599564120fa41f9df2c567842d003728dab.zip
powerpc/code-patching: Move instr_is_branch_{i/b}form() in code-patching.h
To enable moving selftests in their own C file in following patch, move instr_is_branch_iform() and instr_is_branch_bform() to code-patching.h Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/fca0f3b191211b3681020885a611bf73eef20563.1638446239.git.christophe.leroy@csgroup.eu
Diffstat (limited to 'arch/powerpc/lib')
-rw-r--r--arch/powerpc/lib/code-patching.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c
index f4986a781d53..e24a4b0ce877 100644
--- a/arch/powerpc/lib/code-patching.c
+++ b/arch/powerpc/lib/code-patching.c
@@ -285,21 +285,6 @@ int create_cond_branch(ppc_inst_t *instr, const u32 *addr,
return 0;
}
-static unsigned int branch_opcode(ppc_inst_t instr)
-{
- return ppc_inst_primary_opcode(instr) & 0x3F;
-}
-
-static int instr_is_branch_iform(ppc_inst_t instr)
-{
- return branch_opcode(instr) == 18;
-}
-
-static int instr_is_branch_bform(ppc_inst_t instr)
-{
- return branch_opcode(instr) == 16;
-}
-
int instr_is_relative_branch(ppc_inst_t instr)
{
if (ppc_inst_val(instr) & BRANCH_ABSOLUTE)