From: Paul Walmsley <pjw@kernel.org>
To: "Radim Krčmář" <rkrcmar@ventanamicro.com>
Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Alexandre Ghiti" <alex@ghiti.fr>,
"Atish Patra" <atishp@rivosinc.com>,
"Andrew Jones" <ajones@ventanamicro.com>,
"Clément Léger" <cleger@rivosinc.com>,
"Anup Patel" <apatel@ventanamicro.com>,
"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
"David Laight" <david.laight.linux@gmail.com>
Subject: Re: [PATCH v2 1/2] RISC-V: sbi: turn sbi_ecall into variadic macro
Date: Tue, 6 Oct 2026 03:47:01 -0600 (MDT) [thread overview]
Message-ID: <d481749b-2c83-a7f8-9c25-dd6e78a77c9a@kernel.org> (raw)
In-Reply-To: <20250619190315.2603194-2-rkrcmar@ventanamicro.com>
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
On Thu, 19 Jun 2025, Radim Krčmář wrote:
> The SBI ecall interface has 0~6 arguments in a0~a5, and undefined
> arguments are not reserved, so we don't have to zero the registers.
>
> The current sbi_ecall forces programmers to pad the argument count,
> which makes it hard to distinguish what is a value 0, and what is the
> padding, because 0 was traditionally used for padding as well.
>
> Turn sbi_ecall into a variadic macro that accepts 2~8 arguments, and
> where only the specified arguments get passed to the ecall instruction.
>
> The register a1 is zeroed if unused, to prevent unnecessary leaks of
> kernel register state from the tracepoints.
>
> Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Thanks, queued for v7.4.
- Paul
next prev parent reply other threads:[~2026-10-06 9:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 19:03 [PATCH v2 0/2] RISC-V: turn sbi_ecall into a " Radim Krčmář
2025-06-19 19:03 ` [PATCH v2 1/2] RISC-V: sbi: turn sbi_ecall into " Radim Krčmář
2026-10-06 9:47 ` Paul Walmsley [this message]
2025-06-19 19:03 ` [PATCH v2 2/2] RISC-V: make use of variadic sbi_ecall Radim Krčmář
2026-10-06 9:55 ` Paul Walmsley
2025-06-19 19:03 ` [PATCH v2 3/2] RISC-V: sbi: remove sbi_ecall tracepoints Radim Krčmář
2025-06-23 22:54 ` Palmer Dabbelt
2025-06-24 13:09 ` Radim Krčmář
2025-06-25 7:51 ` Radim Krčmář
2025-06-25 8:34 ` David Laight
2025-06-26 8:10 ` Radim Krčmář
2025-06-23 22:53 ` [PATCH v2 0/2] RISC-V: turn sbi_ecall into a variadic macro Palmer Dabbelt
2025-06-24 8:09 ` David Laight
2025-06-24 12:40 ` Radim Krčmář
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=d481749b-2c83-a7f8-9c25-dd6e78a77c9a@kernel.org \
--to=pjw@kernel.org \
--cc=ajones@ventanamicro.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=atishp@rivosinc.com \
--cc=cleger@rivosinc.com \
--cc=david.laight.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rkrcmar@ventanamicro.com \
--cc=thomas.weissschuh@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®