From nobody Fri Sep 25 15:13: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 2CC59279DAF; Fri, 11 Sep 2026 03:28:02 +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=1789097284; cv=none; b=b8tKV4hPQE677rem6r8eAzCFfTbVW8UnAeKqiF23KUDBghWQw8Zpj5OYAolNl+8Pxb5e2VQNDCVtxSCYWL+hjSC2h/SDhTclwfaokdNHGL0GkhRj1da5hF14psT4ZTG6iLGfMeYTboPHv2BUHWzNK5mpxdebgbMNIPk5Mu16QhQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789097284; c=relaxed/simple; bh=ZgRwqnL1xEwJuNVxRcqcBty/gZdRtWBY1J1AAsTl1lM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cGKIfcfRv4pfiH5RhyQgJzp88f+O35R+8/QIf8Bc+s4oqDgerRmWINa1CGML///MnmbZs/wEkKTJJ5Q50fFFCXsz0zQBghQV/lj194xiR29EunlLvHHKjZqBgQTKqwjGb9xpWkExCrDkJvlal7I8d6OTxy2I4y1tFV3p45wiKiY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=diTt3vef; 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="diTt3vef" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49A851F00893; Fri, 11 Sep 2026 03:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789097282; bh=kHltKlWHwYJPqeo4oBbRoLIdif+urCXRiNwOSKd5An4=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=diTt3vefE5Y8zWY47uFIQxTU2hQBr2sF/iqHtAGKrBVVFEUtLHETXpi1WwOXVSCR+ E9VaMDuQTW7ieFUX2+gKCTEq1JAzw4Ina8g8bPpsKn9KDHKZfD6pg6Jk6s73x8gizZ SRs1ZYWvjakJNzcEXjsgqyNTAcnedgLRx+HLnrEATbXAYxYNaFUWUrs0FhNfBGs0Xe 13sAf/H7jpkz5plvYeaTQkW6mq2jK/9EXO76YpYY/PmTIjo6VGQivXeEr3lY8bCQh/ pUWOsD/J0/F+ZakHS+aJbgJyMdJfZ5N/CcIDU/q6cx6aKOHnjpejAR2TivekRF2Woo u3jW1KO2xNQpg== From: Guo Ren Date: Fri, 11 Sep 2026 03:27:09 +0000 Subject: [PATCH v2 1/6] riscv: smp: Move enum ipi_message_type to asm/smp.h Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-ipi_max-v2-1-a77826ff189e@kernel.org> References: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> In-Reply-To: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Daniel Lezcano , Thomas Gleixner , Radu Rendec , Anup Patel , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, "tip-bot2 for GUO Ren (XuanTie)" , "GUO Ren (XuanTie)" X-Mailer: b4 0.16.0 From: "tip-bot2 for GUO Ren (XuanTie)" The following commit has been merged into the irq/drivers branch of tip: Commit-ID: 1ae91dc397eb1dbc0f4fc6b96f2481cbc02fe0f9 Gitweb: https://git.kernel.org/tip/1ae91dc397eb1dbc0f4fc6b96f2481cbc= 02fe0f9 Author: GUO Ren (XuanTie) AuthorDate: Sun, 16 Aug 2026 07:00:45 Committer: Thomas Gleixner 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) Signed-off-by: Thomas Gleixner Reviewed-by: Radu Rendec Reviewed-by: Anup Patel 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; =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 Fri Sep 25 15:13: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 4AE703DC4D9; Fri, 11 Sep 2026 03:28:09 +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=1789097290; cv=none; b=VNCm48e61BapKNN2HHpBgfn7K8SvQqs/U7m57Od3E3UM37xLHok/cbKzjb5EurZe++5cVEF2QW8qCsANJlX+Q+AKBQIW0Yf5t8mwE16C/3XbyryzAklahbMNuWVmZPGluds3IWpUKWtXosJPxVS8TidvZoUbECVVf5aB5upwPl0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789097290; c=relaxed/simple; bh=tmrKbZe/FQ5ZENJfY5AZXndssTok4+AJnBT6nbKFwc8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rkeMuYfg7EcV4xaRtgsmYYzQtQ5svHLOFem9m7nAL7Wue7xY3+EQRaD8IZTG6VO6WPDRFrRlS4h1H97C+j0Q41Mo6rvHAk8meQc2SuaugWliALmNU18Mr6n5Oapn2Vgt6oeKUl2Kzx3m8I0OnLmfhvxchxa6Ij1191KJNrPYVTo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=feUh0UZB; 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="feUh0UZB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9AB181F000FF; Fri, 11 Sep 2026 03:28:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789097288; bh=QbMD56baPgM+e8xPeMNNZSCp/t9stBa6OwHW9SFOA28=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=feUh0UZBssO51F57kDi2j/ZaL6ovAYwz5gkKITjjKUh0UlXjPERvne8pnMQ/QpT0U oPsXx4uVqHTmf3eX8kkEtBqAYPgRGiOX8plVLwQLdoE4w2qpWbXd0c3C1FChmKHrzm upH51A4XT7x2TmOdH623XueCJMkvtDqnf6koNB1scqwAbu1ylwL4RVtQFkC4SV0WcW qHFD4uE8JKaIwQS5dtHxVGdA8NxRjO0pbWlEpV9PdoQR4E6vNCeUFVLKGGiC6UdJe0 B5Lr268ylvHEGQV1+szYoiLWXi4yPm+cM8SZUXT19AlyAH1ZebLVzplzmC5MrsTiEG dc84KF0TWuwJQ== From: Guo Ren Date: Fri, 11 Sep 2026 03:27:10 +0000 Subject: [PATCH v2 2/6] riscv: sbi: Use IPI_MAX for SBI IPI muxing Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-ipi_max-v2-2-a77826ff189e@kernel.org> References: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> In-Reply-To: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Daniel Lezcano , Thomas Gleixner , Radu Rendec , Anup Patel , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, "tip-bot2 for GUO Ren (XuanTie)" , "GUO Ren (XuanTie)" X-Mailer: b4 0.16.0 From: "tip-bot2 for GUO Ren (XuanTie)" The following commit has been merged into the irq/drivers branch of tip: Commit-ID: 2a0d49514f297baee259b19fb5553b538aa67d10 Gitweb: https://git.kernel.org/tip/2a0d49514f297baee259b19fb5553b538= aa67d10 Author: GUO Ren (XuanTie) AuthorDate: Sun, 16 Aug 2026 07:00:46 Committer: Thomas Gleixner CommitterDate: Fri, 04 Sep 2026 15:34:34 +02:00 riscv: sbi: Use IPI_MAX for SBI IPI muxing 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) Signed-off-by: Thomas Gleixner Reviewed-by: Anup Patel Link: https://patch.msgid.link/20260816070049.2097442-3-guoren@kernel.org --- 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 Fri Sep 25 15:13: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 6557B35C1B2; Fri, 11 Sep 2026 03:28:14 +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=1789097295; cv=none; b=JB5x4XFRcb41prF3STWWuDuA1Kg0NksEkTzjAzWwKgFGyx4S1/IwdDhZtmExQxxjbRKBrXXAKosAMkffFzyOrkRjiw0fEqT4bfIN5eUBz/fNtGKyO/wvSnmBmg7fIOzjugrOoi1+YqKbCEBb8cfu0YaswmnND6hxMOefgd5MsEs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789097295; c=relaxed/simple; bh=OF0sPsDwkbWiDnj/HCiRsQBt4xFUkso8KDZ/YceRohk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iAoBEv7D83nTz+cqGMzZmqMYFmwp5CGPUf+471BaPtFjk98XIposnEnABXTdv1G7I1SilRgsrPGu50nWsN9VH1/MEMkoU2qP2hqvjR6Cb0LIvKl6gLC34csco4KAQPwa9E0jkM1eILnvjirbUDoVkzslaUQJfZvUKIYJM7b4e0k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HFNmoNtO; 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="HFNmoNtO" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 590191F00893; Fri, 11 Sep 2026 03:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789097294; bh=+YGz+V8i2Tas85KJKYFj/ybAdrkKvSaeyZci6zxQyQQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=HFNmoNtOHiD/49OInUi9e/bZQ1UbPM0ExRcVg9AKDluhZRnAG1dDxIba74yMLwGDS IX2A4YA3Af+gCFmT60GN5cFBQkX5Ts2SffqmqcPEuS2a1SkwVQ7mRtrzS/wv44sDVS pmQ1XiHuopOGzAVwhW6g1JWvDrbhQHPqo8rBDtOvJZi9LT8iVK+Ee7/q2b83gKIbLw BzGzFn8lm05/31D/jwodF6Ef5ZCFD7Uh/w69XLF87atZ5JprmfKRcKE+Q/F/NgZ5jn veTzZBnvvOkLdoDYuWyX50x1UlJOhTGXQ/t9IQv5vXuKCHsuVl0mXLCtUs8Le1Lkq8 KRehITOdW5YEw== From: "GUO Ren (XuanTie)" Date: Fri, 11 Sep 2026 03:27:11 +0000 Subject: [PATCH v2 3/6] clocksource: clint: Use IPI_MAX for IPI muxing Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-ipi_max-v2-3-a77826ff189e@kernel.org> References: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> In-Reply-To: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Daniel Lezcano , Thomas Gleixner , Radu Rendec , Anup Patel , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, "GUO Ren (XuanTie)" X-Mailer: b4 0.16.0 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) --- 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 Fri Sep 25 15:13: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 72D463E9C18; Fri, 11 Sep 2026 03:28:20 +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=1789097301; cv=none; b=L949jjSkyj5JRG76EmzVsZuLEta9qVWZW0UzFHWV8DRMb1wDUmlqpmW60AO+//BSFNiko+7TCJ8xHfWRSxYA0lOXbUjQ2xpahFZaTtlEbrGok4jV/zlhwFfU66Wglj9MOw2pqE0cF6ZnDZZqOC9zlVdETwvXfqegdL42I5coZU4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789097301; c=relaxed/simple; bh=EUMCGif4z8csooEEPaauTE89H1b2IejruCat9pT3H0I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PwWUYumuWh5sZkxYa/jGvluCM02DpoMMaMM3zLarLEdoM3MwBBF9iqkqxABeJfmbNdRNWwwb3BkPsmTCkkr1TUGcaJl4mR6BEAKoR0ePS9UEKexmslzf1c5d+KlwK7oKKnGoaJCB91bByFoqC/8sl8FsNvwJyAcX7DiJy5Td9fQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MuyGIa+L; 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="MuyGIa+L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BF6A1F00899; Fri, 11 Sep 2026 03:28:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789097300; bh=2A7ZXlaUgzKlIRf43CRGlNeTsk8uPGumps0WoOKIcXc=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=MuyGIa+L/7cRt+s9yK++OGfB5nWowDjYEv1WlWuvCKsgNWQptCipSm14Izdt6MC44 grmDwu0q2rrcHBigQ50y3j2QnUciLRSgV+xV4+N+HHLeTvz93vGTIUuENqTcr3DWXp T/m88xKj/K/GHQQpaTnDH4HJ0dWbCC1BSIHrM6LIpKVERDQMQnWHgHCcCzLEwVQPm9 prwZ5cRFWxgzvHrYATZv6clkE82Cj/q7GUish2stIk4jOwiSiEN+TRGVCIR7hbpdT1 +esHCjSrskLUiRyY/LLVcYTQQagknazLYF1ApB+n5khIhE8fviQ/4DRmWoo8hN09QF HG5HVnk7OkGVw== From: "GUO Ren (XuanTie)" Date: Fri, 11 Sep 2026 03:27:12 +0000 Subject: [PATCH v2 4/6] irqchip/aclint-sswi: Use IPI_MAX for IPI muxing Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-ipi_max-v2-4-a77826ff189e@kernel.org> References: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> In-Reply-To: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Daniel Lezcano , Thomas Gleixner , Radu Rendec , Anup Patel , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, "GUO Ren (XuanTie)" X-Mailer: b4 0.16.0 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) --- 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 Fri Sep 25 15:13: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 5E8F83E95A0; Fri, 11 Sep 2026 03:28:26 +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=1789097307; cv=none; b=M6DsLYrtEx+qWXL4hhckpyfLRmx8Rzk9tdmZ3qO37tzbCDQR6uJ0Swhtilm94Yrw6GVYJoDldtilsHhZckpFc6yzXUnXb0i43BZLK5wKegJem0wO/FhvwQUzlpt4rEdkTI4NeYHQVg8Ui4Zl1jiwUpcNYe58F0VgMBlD/PKmdi8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789097307; c=relaxed/simple; bh=5g0VP463kcwyn9tkUxV+RI/4+ednfZYPxSivnCWQb4Q=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=utISQmzTalPS4HTMFBNcVIPMw4cHs8JSKViZRtgRkkMt7cgP+7+8Kb8LWAf71M4TH5o+RmSY7qECGcslFlU7Aucrj9SGXSq31fItBO0wDYaCuW+3vhNYWN6wk+tI4uAw/uhRGmpDsB+W9/7jVBKGY8WTFf7/hpS3bIE3SJ4x5Eo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=BDucrous; 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="BDucrous" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA27D1F000FF; Fri, 11 Sep 2026 03:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789097305; bh=N9blcEeeVVkCrQCOIeYD/reFetuknNAW0ll7RH3TTDQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=BDucrousMH47zXE7txEPhdHKMX0Z1S+7ZumDxyQpMjfxMhR3VWmQRhCVYnON635E3 kTXz4Kdfk5Z/qlq3W5Bd89aBCejdW8bFVYwRyOYhVHmsY5vtJVcTjh+O9lSfCb1M6H ZW0DQqnqHpDTfGEOv/G/8sDYjddf8RMwabHcqrg+rz/knPuvuB9P3d9XKLNH8OJ7Ny paHfHEIYVEGvBwb0XkxX1MhCGGT4rqrVRG0ghcOr+erRQ9QQzNRbaHgABOz0VIPDpU Z891QUVhOryVPoWAtdd9Zr0nFSmTckFrlG89rG451g82JX8GqW4oTXBRWcFj38w/YE 9FRJgDp+rITOQ== From: "GUO Ren (XuanTie)" Date: Fri, 11 Sep 2026 03:27:13 +0000 Subject: [PATCH v2 5/6] irqchip/imsic: Use IPI_MAX instead of IMSIC_NR_IPI Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-ipi_max-v2-5-a77826ff189e@kernel.org> References: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> In-Reply-To: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Daniel Lezcano , Thomas Gleixner , Radu Rendec , Anup Patel , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, "GUO Ren (XuanTie)" X-Mailer: b4 0.16.0 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) --- 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 From nobody Fri Sep 25 15:13: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 B2BF83EB7FB; Fri, 11 Sep 2026 03:28:31 +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=1789097313; cv=none; b=tl30K0R2R1O53aZdyPKOjFaZyt4kT4Z22KNuL1knnvqilZYaTnTd5kSSIxSmc6ZwTt07ptoV8gLNxphgQQQkvJuIrB2pSNS0jwmPd4YfkUShvNNoCEIS/5g61hd0MpPHbBghlzHZKqKfKWAH8NTR8+ozUKovW1zUoId1VmXFHxQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789097313; c=relaxed/simple; bh=pkryGunVAs4cfHiSV/nJ61BSB4eD034VA6dMqSR9jxI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=uJZPjW9dfCvhQABRqbojpINhyAHSJGMhT/F62fwbJrjMmY31fXbANJacSVNHaAJfHW4I8226XnlrrHRxmn543bokEchxv850ZSYsxyGWMr6YFX5m0VFA/cfXrqrGMXK/CF/kxQah9N2XzAt9pGOI16BwU3fhR6JSetWNicyfEts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KNRZ9go1; 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="KNRZ9go1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A6EA1F00893; Fri, 11 Sep 2026 03:28:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1789097311; bh=JqgSoIBESDHLyR7I67daLRSr3Iyho5ADiCyaj7jEfiU=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=KNRZ9go1qR8L7JRb9Xn3RhWpeR8GUiFEVCXwjQ82DsyIfAayNiE8/5RN45cUt1Zqi 8OMUYuVX/CpqposqTctGjdM+wf+x1T/6rysS/QuaBbfqLiA8bXNNK1odnylHZReKX9 A6q1lNPCitZ97TLfkNkQIEAznSUwT8V3IQ6m/OTLVFZFkYuu+LcUWju489LHfveTY0 ZiQz31TI+rPNLUBXmBvB+OXL7u/IfV+WdkytlAJosNU0dPl2z5bJW1unnvAPGyb9iJ mKe3jw3PIVq6Fm6Pde8OTQzYqgxNfrS+8gJBm9xjKDmIcFOQLeBcR16N4oItKnShAX RiCd0Oj1cQbrg== From: "GUO Ren (XuanTie)" Date: Fri, 11 Sep 2026 03:27:14 +0000 Subject: [PATCH v2 6/6] media: mtk-vpu: rename IPI_MAX to IPI_VPU_MAX Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260911-ipi_max-v2-6-a77826ff189e@kernel.org> References: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> In-Reply-To: <20260911-ipi_max-v2-0-a77826ff189e@kernel.org> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Daniel Lezcano , Thomas Gleixner , Radu Rendec , Anup Patel , Tiffany Lin , Andrew-CT Chen , Yunfei Dong , Minghsiu Tsai , Houlong Wei , Mauro Carvalho Chehab , Matthias Brugger , AngeloGioacchino Del Regno Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Nathan Chancellor , "GUO Ren (XuanTie)" X-Mailer: b4 0.16.0 The last enumerator of this driver's firmware IPI id list is a bound for the VPU mailbox protocol, not a generic host IPI limit. Follow the existing naming in this header: IPI_VPU_INIT already carries a VPU prefix, so the terminator should match. The same convention is used by the SCP IPI enum, which ends with a prefixed SCP_IPI_MAX rather than a bare IPI_MAX. Rename IPI_MAX to IPI_VPU_MAX and update the descriptor table bounds and range checks. No functional change. Link: https://lore.kernel.org/linux-riscv/20260908222349.GA2324870@ax162 Cc: Nathan Chancellor Signed-off-by: GUO Ren (XuanTie) Reviewed-by: Radu Rendec --- drivers/media/platform/mediatek/vpu/mtk_vpu.c | 12 ++++++------ drivers/media/platform/mediatek/vpu/mtk_vpu.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/mediatek/vpu/mtk_vpu.c b/drivers/media/= platform/mediatek/vpu/mtk_vpu.c index 8d8319f0cd22..b3e9f8c4ab7a 100644 --- a/drivers/media/platform/mediatek/vpu/mtk_vpu.c +++ b/drivers/media/platform/mediatek/vpu/mtk_vpu.c @@ -211,7 +211,7 @@ struct mtk_vpu { struct vpu_regs reg; struct vpu_run run; struct vpu_wdt wdt; - struct vpu_ipi_desc ipi_desc[IPI_MAX]; + struct vpu_ipi_desc ipi_desc[IPI_VPU_MAX]; struct share_obj __iomem *recv_buf; struct share_obj __iomem *send_buf; struct device *dev; @@ -221,7 +221,7 @@ struct mtk_vpu { struct mutex vpu_mutex; /* for protecting vpu data data structure */ u32 wdt_refcnt; wait_queue_head_t ack_wq; - bool ipi_id_ack[IPI_MAX]; + bool ipi_id_ack[IPI_VPU_MAX]; }; =20 static inline void vpu_cfg_writel(struct mtk_vpu *vpu, u32 val, u32 offset) @@ -296,7 +296,7 @@ int vpu_ipi_register(struct platform_device *pdev, return -EPROBE_DEFER; } =20 - if (id < IPI_MAX && handler) { + if (id < IPI_VPU_MAX && handler) { ipi_desc =3D vpu->ipi_desc; ipi_desc[id].name =3D name; ipi_desc[id].handler =3D handler; @@ -319,7 +319,7 @@ int vpu_ipi_send(struct platform_device *pdev, unsigned long timeout; int ret =3D 0; =20 - if (id <=3D IPI_VPU_INIT || id >=3D IPI_MAX || + if (id <=3D IPI_VPU_INIT || id >=3D IPI_VPU_MAX || len > sizeof(send_obj->share_buf) || !buf) { dev_err(vpu->dev, "failed to send ipi message\n"); return -EINVAL; @@ -748,7 +748,7 @@ static void vpu_ipi_handler(struct mtk_vpu *vpu) s32 id =3D readl(&rcv_obj->id); =20 memcpy_fromio(data, rcv_obj->share_buf, sizeof(data)); - if (id < IPI_MAX && ipi_desc[id].handler) { + if (id < IPI_VPU_MAX && ipi_desc[id].handler) { ipi_desc[id].handler(data, readl(&rcv_obj->len), ipi_desc[id].priv); if (id > IPI_VPU_INIT) { @@ -934,7 +934,7 @@ static int mtk_vpu_probe(struct platform_device *pdev) #ifdef CONFIG_DEBUG_FS debugfs_remove(vpu_debugfs); #endif - memset(vpu->ipi_desc, 0, sizeof(struct vpu_ipi_desc) * IPI_MAX); + memset(vpu->ipi_desc, 0, sizeof(struct vpu_ipi_desc) * IPI_VPU_MAX); vpu_mutex_destroy: mutex_destroy(&vpu->vpu_mutex); disable_vpu_clk: diff --git a/drivers/media/platform/mediatek/vpu/mtk_vpu.h b/drivers/media/= platform/mediatek/vpu/mtk_vpu.h index 3951547e9ec5..44ab631ec904 100644 --- a/drivers/media/platform/mediatek/vpu/mtk_vpu.h +++ b/drivers/media/platform/mediatek/vpu/mtk_vpu.h @@ -49,7 +49,7 @@ typedef void (*ipi_handler_t) (void *data, * handle VP8 video encoder job,, and vice versa. * @IPI_MDP: The interrupt from vpu is to notify kernel to * handle MDP (Media Data Path) job, and vice versa. - * @IPI_MAX: The maximum IPI number + * @IPI_VPU_MAX: The maximum VPU IPI number */ =20 enum ipi_id { @@ -60,7 +60,7 @@ enum ipi_id { IPI_VENC_H264, IPI_VENC_VP8, IPI_MDP, - IPI_MAX, + IPI_VPU_MAX, }; =20 /** --=20 2.43.0