riscv, bpf: fix patch_text implicit declaration
Subsystems (4)
PATCH 1/1 riscv, bpf: fix patch_text implicit declaration
bpf_jit_comp64.c uses patch_text(), so add it to a local header file to prevent the build error:
../arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke':../arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration]
691 | ret = patch_text(ip, new_insns, ninsns);
| ^~~~~~~~~~---
What is the proper path to have this merged soon to stop build errors?
arch/riscv/net/bpf_jit.h | 1 + 1 file changed, 1 insertion(+)
arch/riscv/net/bpf_jit.h +1 -0
@@ -12,6 +12,7 @@#include <linux/bpf.h> #include <linux/filter.h> #include <asm/cacheflush.h> +#include <asm/patch.h> static inline bool rvc_enabled (void ) {
Pu Lehui
maintainerQuoted 36 lines · Randy Dunlap
bpf_jit_comp64.cusespatch_text(), so add it to a local header file to prevent the build error:
../arch/riscv/net/bpf_jit_comp64.c: In function 'bpf_arch_text_poke':../arch/riscv/net/bpf_jit_comp64.c:691:23: error: implicit declaration of function 'patch_text'; did you mean 'path_get'? [-Werror=implicit-function-declaration]691 | ret = patch_text(ip, new_insns, ninsns); | ^~~~~~~~~~Fixes 596f2e6f9cf4 ("riscv, bpf: Add bpf_arch_text_poke support for RV64")Signed-off-by Randy Dunlap <[email protected]>Reported-by kernel test robot <[email protected]>Cc Pu Lehui <[email protected]>Cc Luke Nelson <[email protected]>Cc Xi Wang <[email protected]>Cc Alexei Starovoitov <[email protected]>Cc Daniel Borkmann <[email protected]>Cc John Fastabend <[email protected]>Cc Andrii Nakryiko <[email protected]>Cc Paul Walmsley <[email protected]>Cc Palmer Dabbelt <[email protected]>Cc Albert Ou <[email protected]>Cc "Björn Töpel" <[email protected]>---
What is the proper path to have this merged soon to stop build errors?arch/riscv/net/bpf_jit.h | 1 + 1 file changed, 1 insertion(+)diff --
a/arch/riscv/net/bpf_jit.hb/arch/riscv/net/bpf_jit.h
arch/riscv/net/bpf_jit.h line 16
Quoted 5 lines
arch/riscv/net/bpf_jit.h +1
-0@@ -12,6 +12,7 @@#include <linux/bpf.h> #include <linux/filter.h> #include <asm/cacheflush.h> +#include <asm/patch.h>
Thanks Randy. Since patch_text is only used in riscv64 at present, I think it is appropriate to add it to arch/riscv/net/bpf_jit_comp64.c
Quoted 2 lines
arch/riscv/net/bpf_jit.h +0
-0static inline bool rvc_enabled (void ) {