public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next v3] riscv, bpf: Add kfunc support for RV64
@ 2023-02-21 14:06 Pu Lehui
  2023-02-22 21:20 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Pu Lehui @ 2023-02-21 14:06 UTC (permalink / raw)
  To: bpf, linux-riscv, linux-kernel
  Cc: Björn Töpel, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
	Pu Lehui, Pu Lehui

From: Pu Lehui <pulehui@huawei.com>

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>
---
v3:
- rewrite commit message to make more sense.
- Add Acked-by of Björn.

 arch/riscv/net/bpf_jit_comp64.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/riscv/net/bpf_jit_comp64.c b/arch/riscv/net/bpf_jit_comp64.c
index f5a668736c79..a9270366dc57 100644
--- a/arch/riscv/net/bpf_jit_comp64.c
+++ b/arch/riscv/net/bpf_jit_comp64.c
@@ -1751,3 +1751,8 @@ void bpf_jit_build_epilogue(struct rv_jit_context *ctx)
 {
 	__build_epilogue(false, ctx);
 }
+
+bool bpf_jit_supports_kfunc_call(void)
+{
+	return true;
+}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH bpf-next v3] riscv, bpf: Add kfunc support for RV64
  2023-02-21 14:06 [PATCH bpf-next v3] riscv, bpf: Add kfunc support for RV64 Pu Lehui
@ 2023-02-22 21:20 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-02-22 21:20 UTC (permalink / raw)
  To: Pu Lehui
  Cc: bpf, linux-riscv, linux-kernel, bjorn, ast, daniel, andrii,
	martin.lau, song, yhs, john.fastabend, kpsingh, sdf, haoluo,
	jolsa, pulehui

Hello:

This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:

On Tue, 21 Feb 2023 22:06:56 +0800 you wrote:
> From: Pu Lehui <pulehui@huawei.com>
> 
> 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.
> 
> [...]

Here is the summary with links:
  - [bpf-next,v3] riscv, bpf: Add kfunc support for RV64
    https://git.kernel.org/bpf/bpf-next/c/d40c3847b485

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-22 21:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-21 14:06 [PATCH bpf-next v3] riscv, bpf: Add kfunc support for RV64 Pu Lehui
2023-02-22 21:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox