]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/lib: Add helper to check if offset is within conditional branch range
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Mon, 15 Nov 2021 11:05:28 +0000 (16:35 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 10:36:17 +0000 (11:36 +0100)
commit807e3f7ec0d845e039269452ef3ee9f8be654cbd
treec69748abfa6a82c7da6195bb6bb92c31c5934080
parent272717a19a1325b8b446bb0bdb74a53a685bf626
powerpc/lib: Add helper to check if offset is within conditional branch range

upstream commit 4549c3ea3160fa8b3f37dfe2f957657bb265eda9

Add a helper to check if a given offset is within the branch range for a
powerpc conditional branch instruction, and update some sites to use the
new helper.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/442b69a34ced32ca346a0d9a855f3f6cfdbbbd41.1633464148.git.naveen.n.rao@linux.vnet.ibm.com
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/code-patching.h
arch/powerpc/lib/code-patching.c
arch/powerpc/net/bpf_jit.h