Skip to content

riscv: Make IPI_MAX visible and use it consistently

Guo Ren linux-arm-kernel linux-media linux-mediatek linux-riscv lkml 2 versions – Applied

Status from this message: Applied, ty.

Get series with b4
b4 am [email protected] change-id 20260911-ipi_max-ff71eeadf6fd

Versions newest first · linked by author and title

  1. v2 Latest6 patches 7 repliesApplied 6/6
  2. v15 patches 14 repliesApplied

Patches in v2 All 6 applied

#Subject and filesSizeRepliesApplied
1/6riscv: smp: Move enum ipi_message_type to asm/smp.harch/riscv/include/asm/smp.h arch/riscv/kernel/smp.c+12 -120 repliesApplied
2/6riscv: sbi: Use IPI_MAX for SBI IPI muxingarch/riscv/kernel/sbi-ipi.c+2 -20 repliesApplied
3/6clocksource: clint: Use IPI_MAX for IPI muxingdrivers/clocksource/timer-clint.c+2 -21 replyApplied
4/6irqchip/aclint-sswi: Use IPI_MAX for IPI muxingdrivers/irqchip/irq-aclint-sswi.c+2 -20 repliesApplied
5/6irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPIdrivers/irqchip/irq-riscv-imsic-early.c drivers/irqchip/irq-riscv-imsic-state.h+2 -30 repliesApplied
6/6media: mtk-vpu: rename IPI_MAX to IPI_VPU_MAXdrivers/media/platform/mediatek/vpu/mtk_vpu.c drivers/media/platform/mediatek/vpu/mtk_vpu.h+8 -82 repliesApplied

Reviews trailers per patch

4 of 6 patches have a Reviewed-by or Acked-by.

PatchRadu RendecAnup PatelDaniel Lezcano
1/6R-b R-b
2/6R-b
3/6A-b
4/6
5/6
6/6R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/6] riscv: Make IPI_MAX visible and use it consistently

This series removes the implicit assumption that RISC-V supports exactly eight IPI message types.

Currently, the SBI, CLINT and ACLINT SSWI IPI providers use BITS_PER_BYTE when sizing the generic IPI mux, while IMSIC carries a separate IMSIC_NR_IPI definition set to 8. These values happen to match IPI_MAX today, but neither is the proper source of truth for the number of RISC-V IPI message types.

Move enum ipi_message_type to asm/smp.h so IPI providers can use IPI_MAX directly, then replace the BITS_PER_BYTE and IMSIC_NR_IPI uses with IPI_MAX.

This also makes adding future RISC-V IPI message types independent of the current eight-entry assumption.

A follow-up patch renames the MediaTek VPU mailbox terminator from IPI_MAX to IPI_VPU_MAX. That token belongs to the VPU firmware IPI id enum and should follow the same prefixed convention as IPI_VPU_INIT (and SCP_IPI_MAX on the SCP side), instead of reusing the generic IPI_MAX name.

---
GUO Ren (XuanTie) (4):
clocksource: clint: Use IPI_MAX for IPI muxing irqchip/aclint-sswi: Use IPI_MAX for IPI muxing irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPI
media: mtk-vpu: rename IPI_MAX to IPI_VPU_MAX

tip-bot2 for GUO Ren (XuanTie) (2):
riscv: smp: Move enum ipi_message_type to asm/smp.h
riscv: sbi: Use IPI_MAX for SBI IPI muxing

 arch/riscv/include/asm/smp.h                  | 12 ++++++++++++
 arch/riscv/kernel/sbi-ipi.c                   |  4 ++--
 arch/riscv/kernel/smp.c                       | 12 ------------
 drivers/clocksource/timer-clint.c             |  4 ++--
 drivers/irqchip/irq-aclint-sswi.c             |  4 ++--
 drivers/irqchip/irq-riscv-imsic-early.c       |  4 ++--
 drivers/irqchip/irq-riscv-imsic-state.h       |  1 -
 drivers/media/platform/mediatek/vpu/mtk_vpu.c | 12 ++++++------
 drivers/media/platform/mediatek/vpu/mtk_vpu.h |  4 ++--
 9 files changed, 28 insertions(+), 29 deletions(-)

---
base-commit: 08df884136f1c1197bab2a27814404fd329d9aac
change-id: 20260911-ipi_max-ff71eeadf6fd

Best regards,

Signature · 1 line
GUO Ren (XuanTie) <[email protected]>