Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Guo Ren <guoren@kernel.org>
To: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: palmer@dabbelt.com, pjw@kernel.org, aou@eecs.berkeley.edu,
	alex@ghiti.fr, tglx@kernel.org, daniel.lezcano@kernel.org,
	anup@brainfault.org, hui.wang@canonical.com,
	samuel.holland@sifive.com,
	"GUO Ren (XuanTie)" <guoren@kernel.org>
Subject: [PATCH 0/5] riscv: Make IPI_MAX visible and use it consistently
Date: Sun, 16 Aug 2026 07:00:44 +0000	[thread overview]
Message-ID: <20260816070049.2097442-1-guoren@kernel.org> (raw)

From: "GUO Ren (XuanTie)" <guoren@kernel.org>

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.

GUO Ren (XuanTie) (5):
  riscv: smp: Move enum ipi_message_type to asm/smp.h
  riscv: sbi: Use IPI_MAX for SBI IPI muxing
  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

 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 -
 7 files changed, 20 insertions(+), 21 deletions(-)

-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

             reply	other threads:[~2026-08-16  7:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-16  7:00 Guo Ren [this message]
2026-08-16  7:00 ` [PATCH 1/5] riscv: smp: Move enum ipi_message_type to asm/smp.h Guo Ren
2026-08-16  7:00 ` [PATCH 2/5] riscv: sbi: Use IPI_MAX for SBI IPI muxing Guo Ren
2026-08-16  7:00 ` [PATCH 3/5] clocksource: clint: Use IPI_MAX for " Guo Ren
2026-08-16  7:00 ` [PATCH 4/5] irqchip/aclint-sswi: " Guo Ren
2026-08-16 15:22   ` Radu Rendec
2026-08-16  7:00 ` [PATCH 5/5] irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPI Guo Ren

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=20260816070049.2097442-1-guoren@kernel.org \
    --to=guoren@kernel.org \
    --cc=alex@ghiti.fr \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=daniel.lezcano@kernel.org \
    --cc=hui.wang@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=samuel.holland@sifive.com \
    --cc=tglx@kernel.org \
    /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