Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

riscv, bpf: Add kfunc support for RV64

This patch adds kernel function call support for RV64. Since the offset
from RV64 kernel and module functions to bpf programs is almost within
the range of s32, the current infrastructure of RV64 is already
sufficient for kfunc, so let's turn it on.

Suggested-by: Björn Töpel <bjorn@rivosinc.com>
Signed-off-by: Pu Lehui <pulehui@huawei.com>
Acked-by: Björn Töpel <bjorn@rivosinc.com>
Link: https://lore.kernel.org/r/20230221140656.3480496-1-pulehui@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Pu Lehui and committed by
Alexei Starovoitov
d40c3847 df2ccc18

+5
+5
arch/riscv/net/bpf_jit_comp64.c
··· 1751 1751 { 1752 1752 __build_epilogue(false, ctx); 1753 1753 } 1754 + 1755 + bool bpf_jit_supports_kfunc_call(void) 1756 + { 1757 + return true; 1758 + }