All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pu Lehui" <pulehui@huaweicloud.com>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH bpf-next v4 1/3] riscv, bpf: Remap BPF_REG_0 and RV_REG_TCC
Date: Sat, 05 Sep 2026 07:12:13 +0000	[thread overview]
Message-ID: <20260905071213.878301F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260905070409.4141522-2-pulehui@huaweicloud.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The block and inline assembly comments in `bpf_timed_may_goto.S` continue to reference `a5` as the mapped register for `BPF_REG_0`, which contradicts the updated code utilizing `t6`. This patch changes `a5` to `t6` in the instructions, but missed updating the corresponding comments.
--

commit 3f2026164fcac1b3db2387eec49e58f20293243f
Author: Pu Lehui <pulehui@huawei.com>

riscv, bpf: Remap BPF_REG_0 and RV_REG_TCC

This commit remaps BPF_REG_0 to t6 and RV_REG_TCC to t5 to support BPF
stack arguments and unify calling conventions. Freeing up a5 and a6
allows bpf2bpf calls to pass extra arguments consistently with kfuncs.

> diff --git a/arch/riscv/net/bpf_timed_may_goto.S b/arch/riscv/net/bpf_timed_may_goto.S
> index 02c637d874205..ac41bf6dcb3d0 100644
> --- a/arch/riscv/net/bpf_timed_may_goto.S
> +++ b/arch/riscv/net/bpf_timed_may_goto.S
> @@ -21,7 +21,7 @@ SYM_FUNC_START(arch_bpf_timed_may_goto)
>  	addi	s0, sp, 8*SZREG
>  
>  	/* Save BPF registers R0-R5 (a5, a0-a4) */
> -	REG_S	a5, 5*SZREG(sp)
> +	REG_S	t6, 5*SZREG(sp)

[Severity: Low]
This isn't a bug, but should the inline comment above this instruction also
be updated to reflect that R0 is now mapped to t6 rather than a5?

Additionally, in the block comment at the beginning of
arch_bpf_timed_may_goto in arch/riscv/net/bpf_timed_may_goto.S, the text
still documents a5 as R0. Could these documentation references be updated to
match the code changes?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260905070409.4141522-1-pulehui@huaweicloud.com?part=1

  reply	other threads:[~2026-09-05  7:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05  7:04 [PATCH bpf-next v4 0/3] Add bpf stack arguments support for RV64 Pu Lehui
2026-09-05  7:04 ` Pu Lehui
2026-09-05  7:04 ` [PATCH bpf-next v4 1/3] riscv, bpf: Remap BPF_REG_0 and RV_REG_TCC Pu Lehui
2026-09-05  7:04   ` Pu Lehui
2026-09-05  7:12   ` sashiko-bot [this message]
2026-09-05  7:43     ` Pu Lehui
2026-09-05  8:00   ` bot+bpf-ci
2026-09-05  8:00     ` bot+bpf-ci
2026-09-05  8:11     ` Pu Lehui
2026-09-05  8:11       ` Pu Lehui
2026-09-05  7:04 ` [PATCH bpf-next v4 2/3] riscv, bpf: Add BPF stack arguments support for RV64 JIT Pu Lehui
2026-09-05  7:04   ` Pu Lehui
2026-09-05  8:00   ` bot+bpf-ci
2026-09-05  8:00     ` bot+bpf-ci
2026-09-05  8:15     ` Pu Lehui
2026-09-05  8:15       ` Pu Lehui
2026-09-05  7:04 ` [PATCH bpf-next v4 3/3] selftests/bpf: Enable stack argument tests for RV64 Pu Lehui
2026-09-05  7:04   ` Pu Lehui
2026-09-05  7:09   ` sashiko-bot
2026-09-05  7:42     ` Pu Lehui
2026-09-05  7:45   ` bot+bpf-ci
2026-09-05  7:45     ` bot+bpf-ci
2026-09-05  8:05     ` Pu Lehui
2026-09-05  8:05       ` Pu Lehui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260905071213.878301F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=pulehui@huaweicloud.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.