From: Greg Kroah-Hartman Date: Tue, 22 Apr 2025 08:50:27 +0000 (+0200) Subject: Revert "LoongArch: BPF: Fix off-by-one error in build_prologue()" X-Git-Tag: v6.1.135~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e37eabef532fabe29179954bc648254f82a56a84;p=thirdparty%2Fkernel%2Fstable.git Revert "LoongArch: BPF: Fix off-by-one error in build_prologue()" This reverts commit e9ccb262b39a which is commit 7e2586991e36663c9bc48c828b83eab180ad30a9 upstream. It breaks the build. Link: https://lore.kernel.org/r/90288944-3f5b-45b7-ae7d-c7a54398db55@roeck-us.neta Reported-by: Guenter Roeck Cc: Vincent Li Cc: Hengqi Chen Cc: Huacai Chen Signed-off-by: Greg Kroah-Hartman --- diff --git a/arch/loongarch/net/bpf_jit.c b/arch/loongarch/net/bpf_jit.c index d53919729f92d..93e9110aafa1e 100644 --- a/arch/loongarch/net/bpf_jit.c +++ b/arch/loongarch/net/bpf_jit.c @@ -142,8 +142,6 @@ static void build_prologue(struct jit_ctx *ctx) */ if (seen_tail_call(ctx) && seen_call(ctx)) move_reg(ctx, TCC_SAVED, REG_TCC); - else - emit_insn(ctx, nop); ctx->stack_size = stack_adjust; } diff --git a/arch/loongarch/net/bpf_jit.h b/arch/loongarch/net/bpf_jit.h index d9421469a731b..684b22f54ccc6 100644 --- a/arch/loongarch/net/bpf_jit.h +++ b/arch/loongarch/net/bpf_jit.h @@ -25,11 +25,6 @@ struct jit_data { struct jit_ctx ctx; }; -static inline void emit_nop(union loongarch_instruction *insn) -{ - insn->word = INSN_NOP; -} - #define emit_insn(ctx, func, ...) \ do { \ if (ctx->image != NULL) { \