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)
commita8936569a07bf27cc9cfc2a39a1e5ea91273b2d4
treed515cac82d15986a988520651f9a825872234d42
parentf222ab83df92acf72691a2021e1f0d99880dcdf1
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