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 1/5] riscv: smp: Move enum ipi_message_type to asm/smp.h
Date: Sun, 16 Aug 2026 07:00:45 +0000 [thread overview]
Message-ID: <20260816070049.2097442-2-guoren@kernel.org> (raw)
In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org>
From: "GUO Ren (XuanTie)" <guoren@kernel.org>
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>
---
arch/riscv/include/asm/smp.h | 12 ++++++++++++
arch/riscv/kernel/smp.c | 12 ------------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h
index 0ecc67641b09..bed39fff1f8a 100644
--- a/arch/riscv/include/asm/smp.h
+++ b/arch/riscv/include/asm/smp.h
@@ -15,6 +15,18 @@
struct seq_file;
extern unsigned long boot_cpu_hartid;
+enum ipi_message_type {
+ IPI_RESCHEDULE,
+ IPI_CALL_FUNC,
+ IPI_CPU_STOP,
+ IPI_CPU_CRASH_STOP,
+ IPI_IRQ_WORK,
+ IPI_TIMER,
+ IPI_CPU_BACKTRACE,
+ IPI_KGDB_ROUNDUP,
+ IPI_MAX
+};
+
#ifdef CONFIG_SMP
#include <linux/jump_label.h>
diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index fa66f9c97d74..8930b62b15e7 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -28,18 +28,6 @@
#include <asm/cacheflush.h>
#include <asm/cpu_ops.h>
-enum ipi_message_type {
- IPI_RESCHEDULE,
- IPI_CALL_FUNC,
- IPI_CPU_STOP,
- IPI_CPU_CRASH_STOP,
- IPI_IRQ_WORK,
- IPI_TIMER,
- IPI_CPU_BACKTRACE,
- IPI_KGDB_ROUNDUP,
- IPI_MAX
-};
-
static const char * const ipi_names[] = {
[IPI_RESCHEDULE] = "Rescheduling interrupts",
[IPI_CALL_FUNC] = "Function call interrupts",
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
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 1/5] riscv: smp: Move enum ipi_message_type to asm/smp.h
Date: Sun, 16 Aug 2026 07:00:45 +0000 [thread overview]
Message-ID: <20260816070049.2097442-2-guoren@kernel.org> (raw)
In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org>
From: "GUO Ren (XuanTie)" <guoren@kernel.org>
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>
---
arch/riscv/include/asm/smp.h | 12 ++++++++++++
arch/riscv/kernel/smp.c | 12 ------------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h
index 0ecc67641b09..bed39fff1f8a 100644
--- a/arch/riscv/include/asm/smp.h
+++ b/arch/riscv/include/asm/smp.h
@@ -15,6 +15,18 @@
struct seq_file;
extern unsigned long boot_cpu_hartid;
+enum ipi_message_type {
+ IPI_RESCHEDULE,
+ IPI_CALL_FUNC,
+ IPI_CPU_STOP,
+ IPI_CPU_CRASH_STOP,
+ IPI_IRQ_WORK,
+ IPI_TIMER,
+ IPI_CPU_BACKTRACE,
+ IPI_KGDB_ROUNDUP,
+ IPI_MAX
+};
+
#ifdef CONFIG_SMP
#include <linux/jump_label.h>
diff --git a/arch/riscv/kernel/smp.c b/arch/riscv/kernel/smp.c
index fa66f9c97d74..8930b62b15e7 100644
--- a/arch/riscv/kernel/smp.c
+++ b/arch/riscv/kernel/smp.c
@@ -28,18 +28,6 @@
#include <asm/cacheflush.h>
#include <asm/cpu_ops.h>
-enum ipi_message_type {
- IPI_RESCHEDULE,
- IPI_CALL_FUNC,
- IPI_CPU_STOP,
- IPI_CPU_CRASH_STOP,
- IPI_IRQ_WORK,
- IPI_TIMER,
- IPI_CPU_BACKTRACE,
- IPI_KGDB_ROUNDUP,
- IPI_MAX
-};
-
static const char * const ipi_names[] = {
[IPI_RESCHEDULE] = "Rescheduling interrupts",
[IPI_CALL_FUNC] = "Function call interrupts",
--
2.43.0
next prev parent reply other threads:[~2026-08-16 7:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 7:00 [PATCH 0/5] riscv: Make IPI_MAX visible and use it consistently Guo Ren
2026-08-16 7:00 ` Guo Ren
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 ` Guo Ren
2026-08-16 7:00 ` [PATCH 3/5] clocksource: clint: Use IPI_MAX for " Guo Ren
2026-08-16 7:00 ` Guo Ren
2026-08-16 7:00 ` [PATCH 4/5] irqchip/aclint-sswi: " Guo Ren
2026-08-16 7:00 ` Guo Ren
2026-08-16 7:00 ` [PATCH 5/5] irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPI Guo Ren
2026-08-16 7:00 ` 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-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.