Skip to content

[PW_SID:1162517] riscv: Make IPI_MAX visible and use it consistently - #2640

Open
linux-riscv-bot wants to merge 6 commits into
workflow__riscv__fixesfrom
pw1162517
Open

[PW_SID:1162517] riscv: Make IPI_MAX visible and use it consistently#2640
linux-riscv-bot wants to merge 6 commits into
workflow__riscv__fixesfrom
pw1162517

Conversation

@linux-riscv-bot

Copy link
Copy Markdown

PR for series 1162517 applied to workflow__riscv__fixes

Name: riscv: Make IPI_MAX visible and use it consistently
URL: https://patchwork.kernel.org/series/1162517/
Version: 2

tip-bot2 for GUO Ren (XuanTie) and others added 6 commits September 11, 2026 06:23
The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     1ae91dc
Gitweb:        https://git.kernel.org/tip/1ae91dc397eb1dbc0f4fc6b96f2481cbc02fe0f9
Author:        GUO Ren (XuanTie) <guoren@kernel.org>
AuthorDate:    Sun, 16 Aug 2026 07:00:45
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Fri, 04 Sep 2026 15:34:34 +02:00

riscv: smp: Move enum ipi_message_type to asm/smp.h

The IPI message type enumeration (and therefore IPI_MAX) is currently
private to arch/riscv/kernel/smp.c.  Several IPI providers need to know
the exact number of IPIs that the architecture requires, so move the
enum into the public header.

This is a pure code movement with no functional change.

Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Radu Rendec <radu@rendec.net>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20260816070049.2097442-2-guoren@kernel.org
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     2a0d495
Gitweb:        https://git.kernel.org/tip/2a0d49514f297baee259b19fb5553b538aa67d10
Author:        GUO Ren (XuanTie) <guoren@kernel.org>
AuthorDate:    Sun, 16 Aug 2026 07:00:46
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Fri, 04 Sep 2026 15:34:34 +02:00

riscv: sbi: Use IPI_MAX for SBI IPI muxing

Now that IPI_MAX is visible from <asm/smp.h>, replace the hard-coded
BITS_PER_BYTE with the proper symbolic constant in the SBI IPI
extension driver.

No functional change; IPI_MAX is still 8.

Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://patch.msgid.link/20260816070049.2097442-3-guoren@kernel.org
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Replace the hard-coded BITS_PER_BYTE with IPI_MAX now that the
constant is exported from riscv asm/smp.h.

Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Replace the hard-coded BITS_PER_BYTE with IPI_MAX now that the constant
is exported from riscv asm/smp.h.

Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
IMSIC was defining its own IMSIC_NR_IPI (= 8) which happened to match
the architecture's IPI_MAX. Now that IPI_MAX is exported from riscv
asm/smp.h, use the architecture constant and drop the private define.

This keeps the number of multiplexed IPIs in sync with the rest of the
RISC-V IPI infrastructure.

Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
The last enumerator of this driver's firmware IPI id list is a bound
for the VPU mailbox protocol, not a generic host IPI limit. Follow the
existing naming in this header: IPI_VPU_INIT already carries a VPU
prefix, so the terminator should match.

The same convention is used by the SCP IPI enum, which ends with a
prefixed SCP_IPI_MAX rather than a bare IPI_MAX.

Rename IPI_MAX to IPI_VPU_MAX and update the descriptor table bounds
and range checks. No functional change.

Link: https://lore.kernel.org/linux-riscv/20260908222349.GA2324870@ax162
Cc: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants