Re: [PATCH v2 1/5] RISC-V: Move common MPXY helper routines to arch/riscv
From: Rahul Pathak
Date: Sun Nov 29 2026 - 04:52:13 EST
On Mon, Nov 16, 2026 at 10:57 AM Anup Patel <anup.patel@xxxxxxxxxxxxxxxx> wrote:
>
> There are upcoming kernel changes (such as RISC-V EINJ FFH support)
> where the MPXY channel_id is known but the Linux mailbox channel
> instance is not available. For such cases, the kernel will directly
> do SBI MPXY calls bypassing the Linux mailbox framework and share
> the MPXY shared memory with the Linux SBI MPXY mailbox driver.
>
> To support the above, move the common MPXY helper routines and
> MPXY shared memory management from Linux SBI MPXY mailbox driver
> to arch/riscv.
>
> Co-developed-by: Himanshu Chauhan <himanshu.chauhan@xxxxxxxxxxxxxxxx>
> Signed-off-by: Himanshu Chauhan <himanshu.chauhan@xxxxxxxxxxxxxxxx>
> Signed-off-by: Anup Patel <anup.patel@xxxxxxxxxxxxxxxx>
> ---
> arch/riscv/include/asm/sbi.h | 86 +++++-
> arch/riscv/kernel/Makefile | 2 +-
> arch/riscv/kernel/sbi_mpxy.c | 340 +++++++++++++++++++++++
> drivers/mailbox/riscv-sbi-mpxy-mbox.c | 386 +++-----------------------
> 4 files changed, 460 insertions(+), 354 deletions(-)
> create mode 100644 arch/riscv/kernel/sbi_mpxy.c
>
LGTM
Reviewed-by: Rahul Pathak <rahul.pathak@xxxxxxxxxxxxxxxx>