diff options
author | Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> | 2022-02-14 13:41:38 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-03-07 16:04:57 +0300 |
commit | c2067f7f88830cdd020c775ffefe84a8177337af (patch) | |
tree | 4c51ee0e6926dc52948e89349b6e544b550695a3 /arch | |
parent | 0ffdbce6f4a89bb7c0002904d6438ec83cf05ce7 (diff) | |
download | linux-c2067f7f88830cdd020c775ffefe84a8177337af.tar.xz |
powerpc64/bpf: Do not save/restore LR on each call to bpf_stf_barrier()
Instead of saving and restoring LR before each invocation to
bpf_stf_barrier(), set SEEN_FUNC flag so that we save/restore LR in
prologue/epilogue.
Signed-off-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/4446f25478d82a2a4ac9dab2ebdfd88ddf923eb7.1644834730.git.naveen.n.rao@linux.vnet.ibm.com
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/net/bpf_jit_comp64.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/net/bpf_jit_comp64.c b/arch/powerpc/net/bpf_jit_comp64.c index 371bd5a16859..27ac2fc76702 100644 --- a/arch/powerpc/net/bpf_jit_comp64.c +++ b/arch/powerpc/net/bpf_jit_comp64.c @@ -690,11 +690,10 @@ emit_clear: EMIT(PPC_RAW_ORI(_R31, _R31, 0)); break; case STF_BARRIER_FALLBACK: - EMIT(PPC_RAW_MFLR(b2p[TMP_REG_1])); + ctx->seen |= SEEN_FUNC; PPC_LI64(12, dereference_kernel_function_descriptor(bpf_stf_barrier)); EMIT(PPC_RAW_MTCTR(12)); EMIT(PPC_RAW_BCTRL()); - EMIT(PPC_RAW_MTLR(b2p[TMP_REG_1])); break; case STF_BARRIER_NONE: break; |