]> git.baikalelectronics.ru Git - kernel.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>
Tue, 5 Oct 2021 20:25:20 +0000 (01:55 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 7 Oct 2021 07:52:33 +0000 (18:52 +1100)
commit102b52d6ccdae7313a10bf588a467394ab906f93
tree7c483a082777354694a7488ba5e5de32e9e5bbc5
parent4d4ecbc34bdbe40b2a620274360b9519e6b80602
powerpc/lib: Add helper to check if offset is within conditional branch range

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
arch/powerpc/include/asm/code-patching.h
arch/powerpc/lib/code-patching.c
arch/powerpc/net/bpf_jit.h