]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/bpf: Always reallocate BPF_REG_5, BPF_REG_AX and TMP_REG when possible
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 10 Jan 2022 12:29:42 +0000 (12:29 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 12 Feb 2022 11:47:42 +0000 (22:47 +1100)
commit2c8be477aed2ab5f95a7770d9ae7f42f7ee664f2
treed515cac82d15986a988520651f9a825872234d42
parent551fc2a5771a72fef9ae51bc007157870a7028be
powerpc/bpf: Always reallocate BPF_REG_5, BPF_REG_AX and TMP_REG when possible

BPF_REG_5, BPF_REG_AX and TMP_REG are mapped on non volatile registers
because there are not enough volatile registers, but they don't need
to be preserved on function calls.

So when some volatile registers become available, those registers can
always be reallocated regardless of whether SEEN_FUNC is set or not.

Suggested-by: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/b04c246874b716911139c04bc004b3b14eed07ef.1641817763.git.christophe.leroy@csgroup.eu
arch/powerpc/net/bpf_jit.h
arch/powerpc/net/bpf_jit_comp32.c