From nobody Mon Sep 28 22:30:50 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82EE4349CDF for ; Sun, 16 Aug 2026 07:01:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863668; cv=none; b=UumSShJqBPegNprSiMSl93SlG+y5zzeGYi8trKxqnNTfaYHaUPqiVzVXJ4KqKRSRf7zMyN+9PhAR8R6ALmhI+jY3xBYeFPl0TuD6ecsPZ4LILr/GMDiTMywR/igJ5fpsFD2DHezpFbWypjl2O16HZZGztcsubp9h9Xy9FLN/qGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863668; c=relaxed/simple; bh=KnYLPM6e6fCoQKIc0XgzID4C/BO5rLBlBrg06RPyPTg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oEBaqnyBCYQIYtNrgxYyclgx2NEzRBhHwCIWJJUHR2hDKq5XSJLT7Ux1TwsVqADBlBpBSYq0XM3NW+euZ7T0vd1dO5Xa5Iu9zNUFeyIJxEnLaZ9aRgqiDB99864JrpazHdhAhwlyp/9czjEib2ijV1dcsJ0GNW/srHsFTi79kFo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=a/qZzLek; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="a/qZzLek" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26DF81F00A3A; Sun, 16 Aug 2026 07:01:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786863667; bh=4UTcja3qkQaBcJbDA3wKGz+X1tVOnwXVEanKk8tH76s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=a/qZzLek3LA2KYN8J3cNK4mfzniQaCkmnd5sixczVuK9lNKuWCgJYvjIQzmJ3pHCn RCqiohQiDp2YnD4dcoTN9mwTwzcSE+0M78CvexNM4BR4Y+ZA6oLTULXCAt4oJzyCv6 10ETy9jt3X5HCgG8l5UJlb3zYqmDe4fUhR3PfxFX/QsuWLdJk6LSWuJ7E+bmTXO1E0 dTO9SA/k6xpTggKkMQG9FJXLPoN2bF6eYbp1nkhcGMQpiQITpyeZV8Kz8vNGEDPozQ GVrGklR/XnkrwNBJV/J75W6LUKojY3Fhtq2oI80swPuFmHObp00uObUlkXGOIkRBqp wXlEJvPYcQTGQ== From: Guo Ren 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)" Subject: [PATCH 1/5] riscv: smp: Move enum ipi_message_type to asm/smp.h Date: Sun, 16 Aug 2026 07:00:45 +0000 Message-ID: <20260816070049.2097442-2-guoren@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org> References: <20260816070049.2097442-1-guoren@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "GUO Ren (XuanTie)" 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) Reviewed-by: Anup Patel Reviewed-by: Radu Rendec --- 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; =20 +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 =20 #include 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 #include =20 -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[] =3D { [IPI_RESCHEDULE] =3D "Rescheduling interrupts", [IPI_CALL_FUNC] =3D "Function call interrupts", --=20 2.43.0 From nobody Mon Sep 28 22:30:50 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1505230BDB for ; Sun, 16 Aug 2026 07:01:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863672; cv=none; b=EVoKjBWcImEO4QNhnSlQzQwNQMC5SLFV62JRrVtwJNRzHeX2CSpPRZDQ8JrLt9XtgZh1v7YsxrmmjnVHSPulnpUa0ry6SmEiJjQ8ycw8Ni1HZetyEMdS46E7clWJ9Kr0RxL0egDSclcqWdgqrGdJ2T0VV/wE8qmMfgFgJl91uUg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863672; c=relaxed/simple; bh=/W7NGxAL9BqW20OaUhy/pkRiNSPbiOw9EIodJqfpNsQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y48Xw/IAGFYJR+WT+J7DPPY312oVqxYyp7bBnuDVuGwGIggpdwlBv0tGp1gKFnVVl4kF5VlFKhDa8xqtoEwAnKa6aS0dxYkputRNZ3HcOy+PfUdC5DcRB5dNK9xUPit9cQTs/81uPWcKsBeMmKatvU3s3zlmzsWUH/4sVGa5B1s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TISlbhDv; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TISlbhDv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9F6151F000E9; Sun, 16 Aug 2026 07:01:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786863671; bh=6qhxawFRrWwuiVPOyNVYAZ9b5mpiegOTbZA7RhAR7g0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TISlbhDvgTJqS8fWldW2PqgROrYhkeCY1wAyzBIh5B9PwxDD/fkz4Fov+XMJ1C62L lTTNQW9SYgcQTKw3VIJgpJ87hv+/wKj1eDTMF/9tgSDI9jsXfi4MRCAe4Pai61iIZ9 s7df9sIPLJinp3OD2qV0230hkmkxPUQEbSOjX2bGRFuY8flwuSiexqp7SFdkBLPP5+ IdCVM0mfMRbBVsYrnLaOLg2QDjCeGQ8OzA8cb/OioW6ZXtu1Z+UYqN0DBHhRnb4nsI GPtKh2wguVk2b5t+LwWFKJ741v+oRw6Fb0YtNchC5kWIdhLzF7J4rhgmb4rnAcAcX6 1NyJ4rL1bpPUA== From: Guo Ren 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)" Subject: [PATCH 2/5] riscv: sbi: Use IPI_MAX for SBI IPI muxing Date: Sun, 16 Aug 2026 07:00:46 +0000 Message-ID: <20260816070049.2097442-3-guoren@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org> References: <20260816070049.2097442-1-guoren@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "GUO Ren (XuanTie)" Now that IPI_MAX is visible from , 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) Reviewed-by: Anup Patel --- arch/riscv/kernel/sbi-ipi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/riscv/kernel/sbi-ipi.c b/arch/riscv/kernel/sbi-ipi.c index 0cc5559c08d8..eeec178a9b95 100644 --- a/arch/riscv/kernel/sbi-ipi.c +++ b/arch/riscv/kernel/sbi-ipi.c @@ -57,7 +57,7 @@ void __init sbi_ipi_init(void) return; } =20 - virq =3D ipi_mux_create(BITS_PER_BYTE, sbi_send_ipi); + virq =3D ipi_mux_create(IPI_MAX, sbi_send_ipi); if (virq <=3D 0) { pr_err("unable to create muxed IPIs\n"); irq_dispose_mapping(sbi_ipi_virq); @@ -75,7 +75,7 @@ void __init sbi_ipi_init(void) "irqchip/sbi-ipi:starting", sbi_ipi_starting_cpu, NULL); =20 - riscv_ipi_set_virq_range(virq, BITS_PER_BYTE); + riscv_ipi_set_virq_range(virq, IPI_MAX); pr_info("providing IPIs using SBI IPI extension\n"); =20 /* --=20 2.43.0 From nobody Mon Sep 28 22:30:50 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63A092EEE93 for ; Sun, 16 Aug 2026 07:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863677; cv=none; b=tpOvMFIrwqgX3fGJF+mjliSsGaXgq1S7GRTPAKnqjcOKQJ1XyS5z3PvDEX0vLuTs8uyp6FpbGsZVHu+dbTPNyJ+cdMZ2xTWwPh4wfm83P+RClxNtHfth01JuWj6iVaRBKboBUL7VB5hSg09vTc0vBdcauEguZrq9QKRAg3R6l8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863677; c=relaxed/simple; bh=Dltnxy1W0CopqHkdvddNJoTYfRJHVDVWZgJgeDPrfEA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uMvZ0UlVTMtCECRF7eeuJf5yQbts+CL9mcrji03SlDcivBsvnV/2ot/xXPjGwWABmPuf5Gt/Ja6qfI5wZzWMfcaVFA9wqGJXlb0r8QuYauxeMHc4ItHi8ZB2qPU/wLWLHMRvIny4TlLblznja6lxp7+2r466oMVY7Ft4ue7JGao= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jY8BcGCg; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jY8BcGCg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F12121F00A3A; Sun, 16 Aug 2026 07:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786863676; bh=eKuwhqI5qpVbYFVU0dwz1JwffwYDZd8/Fx3eNFM3EQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jY8BcGCgRhfHYuk3ot2jiLnFGOFY3inTilhwH/SR4CPiBpreaVPtXzFy9R7KWL4XT zPTLWSBFxUFA6NgzgIASL6mP5JR3WwqKttGEKhNdzRKeVeEmr7x108rF+0ZIM337L8 nHXh3WvFT7Babj1fd0W1wBYutQFwrk+hOxM2Zp44gwoG06jSor3HYgydr1/XXAr6i1 MqV8E7frAGA05LKhnap3MPm/bXZdmcvk7L6mF+xpEGbpz8MeahXgU+j22XKovLPyGZ W5gZd+zRM9gTjvqMwxYEVWbNjm2Xrsizg+DhvGiHjmcEJfGA5jdM0iuri4U5BqlPHx hQo+Io8Eqg2dw== From: Guo Ren 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)" Subject: [PATCH 3/5] clocksource: clint: Use IPI_MAX for IPI muxing Date: Sun, 16 Aug 2026 07:00:47 +0000 Message-ID: <20260816070049.2097442-4-guoren@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org> References: <20260816070049.2097442-1-guoren@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "GUO Ren (XuanTie)" 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) Reviewed-by: Anup Patel --- drivers/clocksource/timer-clint.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/timer-clint.c b/drivers/clocksource/timer-= clint.c index 0bdd9d7ec545..e56eee7e3781 100644 --- a/drivers/clocksource/timer-clint.c +++ b/drivers/clocksource/timer-clint.c @@ -243,7 +243,7 @@ static int __init clint_timer_init_dt(struct device_nod= e *np) } =20 #ifdef CONFIG_SMP - rc =3D ipi_mux_create(BITS_PER_BYTE, clint_send_ipi); + rc =3D ipi_mux_create(IPI_MAX, clint_send_ipi); if (rc <=3D 0) { pr_err("unable to create muxed IPIs\n"); rc =3D (rc < 0) ? rc : -ENODEV; @@ -251,7 +251,7 @@ static int __init clint_timer_init_dt(struct device_nod= e *np) } =20 irq_set_chained_handler(clint_ipi_irq, clint_ipi_interrupt); - riscv_ipi_set_virq_range(rc, BITS_PER_BYTE); + riscv_ipi_set_virq_range(rc, IPI_MAX); clint_clear_ipi(); #endif =20 --=20 2.43.0 From nobody Mon Sep 28 22:30:50 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1559349CDF for ; Sun, 16 Aug 2026 07:01:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863682; cv=none; b=OCau56/g9hysXF1N+3+H8pnCgNGXO0yNfeKFG0oP4GIe3mRF1Y2igZPOMh1VjdhJ++RviepfCvQEEDwsnTR5s2vfWxAGZy8wCdK6lpzF6o/vgpGWBAL9d1/PUsH06Elar8gcAzjWsVq2DQRhkhAFM3Rvjo/jM5vCJ0Khwbdt9q4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863682; c=relaxed/simple; bh=QSRGQ1iG7+gwazbcPiOB4YhtjqfYeKSjaWJ1RPzk01Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fIAhdEfLeeCeImzZMN6tQfedSQ9lveUcWaOLQivXCOHtzyjmmyEJ9POuouq+oCyU+VSEMElShB6qqE8K+G5sEDWkjqHDK+gny3WsfaRFou2HMRFz9mZAo+23tYue/Wthu+c5LXGmBbz2BBb+jnmms7SCA0WHtvunLO8Bi8/J5nA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KKcb1R+X; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KKcb1R+X" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4D681F000E9; Sun, 16 Aug 2026 07:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786863681; bh=LlOcdIlR/UGWGcEjF0DyvDvYmc+/0am7NsuqSYJwMus=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KKcb1R+Xwd4GvUUSNnuZzdkD3oUAdGwfW8N+3N3NxtTn1PnvshNzfZNLmACHZcQkJ /H7iN29zcbP/2ZseOjXPbB4VANCJQ+dMjtpGAg7910jHP8Xew/fo0wyCS4jzi2E0aI ezKKUmep86SPUxBUR5tDFwLkasA65HL3Op7496gyJZ6zOjT9uGl/MFr+F0CXzr8Z61 5zi4CuBS9O9LLtMLr5y4UByw6qioMeHATuqONMecsAARzBtSDmW8M5TCzlRF1WyATd gZ3NdT8Vnc1vndK01nlASHAfbhkdYYyxXlGZCyavBFv7+J21mAPuKJmeeZ2TYoJY5f NHLhU3cN2s4bw== From: Guo Ren 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)" Subject: [PATCH 4/5] irqchip/aclint-sswi: Use IPI_MAX for IPI muxing Date: Sun, 16 Aug 2026 07:00:48 +0000 Message-ID: <20260816070049.2097442-5-guoren@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org> References: <20260816070049.2097442-1-guoren@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "GUO Ren (XuanTie)" 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) Reviewed-by: Anup Patel Reviewed-by: Radu Rendec --- drivers/irqchip/irq-aclint-sswi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-aclint-sswi.c b/drivers/irqchip/irq-aclint= -sswi.c index ca06efd86fa1..5e010fc401f7 100644 --- a/drivers/irqchip/irq-aclint-sswi.c +++ b/drivers/irqchip/irq-aclint-sswi.c @@ -138,7 +138,7 @@ static int __init aclint_sswi_probe(struct fwnode_handl= e *fwnode) } =20 /* Register SSWI irq and handler */ - virq =3D ipi_mux_create(BITS_PER_BYTE, aclint_sswi_ipi_send); + virq =3D ipi_mux_create(IPI_MAX, aclint_sswi_ipi_send); if (virq <=3D 0) { pr_err("unable to create muxed IPIs\n"); irq_dispose_mapping(sswi_ipi_virq); @@ -152,7 +152,7 @@ static int __init aclint_sswi_probe(struct fwnode_handl= e *fwnode) aclint_sswi_starting_cpu, aclint_sswi_dying_cpu); =20 - riscv_ipi_set_virq_range(virq, BITS_PER_BYTE); + riscv_ipi_set_virq_range(virq, IPI_MAX); =20 return 0; } --=20 2.43.0 From nobody Mon Sep 28 22:30:50 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 155AB230BDB for ; Sun, 16 Aug 2026 07:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863687; cv=none; b=hvoX5EUpsmaTma+f4rh6A3qARbEYofsQABlykYQuI405PrqbRRiFirDD4vFdq1dwoCsIT4q5+dpzfAhZwXItkdfu6X6lkLvhNSjwf7ChAHbKlYEXvYRMJUCn5U9QU9Wt/ZBYfr+Jspo8VjJ3R1Y2zNE5kMfcf2koRcvnD3WnQWs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786863687; c=relaxed/simple; bh=DjWKEp40dbYMvccmMW4HoUEb+j/pQvYI1b+R5Eocft4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OLtCJKIKBI46AVEzeGkYqvKvdDGNp7d72oyMc2wgy9m3r9xVqdrssOhhG+ASS8A6KJZIWTckGLYtrM1BLhD8DYUrais6Z11QiqYdC5AuMZ0lcLlj0fnSgO1Ly3AKAlBUU5C2Kt3DsVzaF+k4pukBHmzNHadzGTYedDt1xDvk7UQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jxHMRhEp; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jxHMRhEp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E01FF1F00A3A; Sun, 16 Aug 2026 07:01:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786863685; bh=dB/jeR1Y8CYCi+kLcLnNsF3XST9sa8hY/+IQpCFYcjI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jxHMRhEpDraNs5qWgyF8Y0u6HTAgxoXCL4aYX6a+rBNvZ31DGd9MOxFD48eNOMs5u RPVv4DCD1qgI4dM4tEpsJzKNOuuD2BTqyS2kLyDbx27cg2JtMcI4roWo3cboYI2W6y OMxq4/0SNEsk93/nbixuaP4FOJZvLrXnsb8NwlKfQM94EtI3P46YYB01BaUVBWrOdq z1/elxmirB5edLLFD4S+AjnmMsVtq+TsI1cH3OW6kUVD0y5ytorJz4+X3B7VQTKvym IH3TCekLNnbS8yUE05SVqLq+7MvpQZMeLcE24CxUyFgVcswiOVR3RytcDxrazPLS+O uIAHZf3r+PkOw== From: Guo Ren 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)" Subject: [PATCH 5/5] irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPI Date: Sun, 16 Aug 2026 07:00:49 +0000 Message-ID: <20260816070049.2097442-6-guoren@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260816070049.2097442-1-guoren@kernel.org> References: <20260816070049.2097442-1-guoren@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: "GUO Ren (XuanTie)" IMSIC was defining its own IMSIC_NR_IPI (=3D 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) Reviewed-by: Anup Patel Reviewed-by: Radu Rendec --- drivers/irqchip/irq-riscv-imsic-early.c | 4 ++-- drivers/irqchip/irq-riscv-imsic-state.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-riscv-imsic-early.c b/drivers/irqchip/irq-= riscv-imsic-early.c index 12efd241ce88..823f5f2ecb3d 100644 --- a/drivers/irqchip/irq-riscv-imsic-early.c +++ b/drivers/irqchip/irq-riscv-imsic-early.c @@ -67,12 +67,12 @@ static int __init imsic_ipi_domain_init(void) return 0; =20 /* Create IMSIC IPI multiplexing */ - virq =3D ipi_mux_create(IMSIC_NR_IPI, imsic_ipi_send); + virq =3D ipi_mux_create(IPI_MAX, imsic_ipi_send); if (virq <=3D 0) return virq < 0 ? virq : -ENOMEM; =20 /* Set vIRQ range */ - riscv_ipi_set_virq_range(virq, IMSIC_NR_IPI); + riscv_ipi_set_virq_range(virq, IPI_MAX); =20 /* Announce that IMSIC is providing IPIs */ pr_info("%pfwP: providing IPIs using interrupt %d\n", imsic->fwnode, IMSI= C_IPI_ID); diff --git a/drivers/irqchip/irq-riscv-imsic-state.h b/drivers/irqchip/irq-= riscv-imsic-state.h index c42ee180b305..878cc192ccec 100644 --- a/drivers/irqchip/irq-riscv-imsic-state.h +++ b/drivers/irqchip/irq-riscv-imsic-state.h @@ -13,7 +13,6 @@ #include =20 #define IMSIC_IPI_ID 1 -#define IMSIC_NR_IPI 8 =20 struct imsic_vector { /* Fixed details of the vector */ --=20 2.43.0