]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "LoongArch: BPF: Fix off-by-one error in build_prologue()"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Apr 2025 08:50:27 +0000 (10:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:44:02 +0000 (10:44 +0200)
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 <linux@roeck-us.net>
Cc: Vincent Li <vincent.mc.li@gmail.com>
Cc: Hengqi Chen <hengqi.chen@gmail.com>
Cc: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/loongarch/net/bpf_jit.c
arch/loongarch/net/bpf_jit.h

index d53919729f92db34a5ea442cf5ee8dd106b894cd..93e9110aafa1ee65e4a78ba7ed8fe7d622514870 100644 (file)
@@ -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;
 }
index d9421469a731b96785279773b2a69596e8078820..684b22f54ccc63dc47d2d6e02dd02e7f64e7e30c 100644 (file)
@@ -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) {                                               \