[PATCH v2 1/6] riscv: smp: Move enum ipi_message_type to asm/smp.h
Guo Ren
guoren at kernel.org
Thu Sep 10 20:27:09 PDT 2026
From: "tip-bot2 for GUO Ren (XuanTie)" <tip-bot2 at linutronix.de>
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: 1ae91dc397eb1dbc0f4fc6b96f2481cbc02fe0f9
Gitweb: https://git.kernel.org/tip/1ae91dc397eb1dbc0f4fc6b96f2481cbc02fe0f9
Author: GUO Ren (XuanTie) <guoren at kernel.org>
AuthorDate: Sun, 16 Aug 2026 07:00:45
Committer: Thomas Gleixner <tglx at 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 at kernel.org>
Signed-off-by: Thomas Gleixner <tglx at kernel.org>
Reviewed-by: Radu Rendec <radu at rendec.net>
Reviewed-by: Anup Patel <anup at brainfault.org>
Link: https://patch.msgid.link/20260816070049.2097442-2-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
More information about the Linux-mediatek
mailing list