From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796326902; b=jo8IFWerhxwsnSpywM7myfbDX2G+PpNanuKJOF64VskYgoCAoWVN+NW2DXOnGKhZFF13 +FI11geYmfz4if6S3mBPpVIk/7LgU0UF7jel1miZ4pnALZbydTFuSzH/VnpNAp7hJkOaH WfWcx9mN+CQTRB4dIVyK1jAqHGOLoVcZivpiPK5mJh6/lSsD8LwwHX4+ZxWVWFJioHQSY cN8T5mGTANBWe7VVDzytzHz3oBzl2YXnibUsdPhg2Q+UjJnJ3k45UxnHRqoBUuVZcTjQH vSC7DB2CEM4MPXBX/nvsT3Yf78ojA2qtdZRCX6YjCbJZQah34FfaVIhR4rFko6Ykk2g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796326902; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=teyPTqsSXryMDIv88JgwOSfOFEafJf2LMsHW0HrPwog=; b=Ie3vBFOiknKxJOKdM+NO2uDAwKua1jR1AteDAR1y/wJKA8brKsqhI0r9fwCl43xf53pL A8ih4VSWHDZSqKqyl93afWjXxsSIu3MdJRGOGmLxlFLYKJeIcM72xEAaSV9aX7Ap51pHV otSUotfqYATxEGQaLDmyqRbePlLcdl5mRDtweL4M0XBJGRa6ZMD/DEqc2sWhWSGsTYmgG wr3LXPFDQLiE0I3x+i/b6Z76LEjT0wNIowmpDUOAgVioqbZ5kwm3VO0mrNiJscPp0Ufsh ju5PzSAKzb6S3eZJGhzvU2ABxRIJ5pwX4xpu7aO7IDg2K1uAmI3XEBSgkncX4X1Z0UQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KTUuVdZW; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64F9D60A382B; Thu, 3 Dec 2026 19:41:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=KTUuVdZW Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4A011F00934; Thu, 3 Dec 2026 19:41:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796326902; bh=teyPTqsSXryMDIv88JgwOSfOFEafJf2LMsHW0HrPwog=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=KTUuVdZWW4NByj/yEfCq7vgRjiLosvCTD/JZBhjcWfww758xLu3mEWT/mnQyZUUPW v4nCj6nd9Vp3jEJ0fuhx1l/h4loCRnrKsueOz+JNH8ls3eNERordpvC+yPwaeEEeDh G5P/mZfhcSYRGAx3IMRQviNTksoqDteyhyhcSAkke+LSLtGYTLCMJZUq6EcizWEKob w6reBsIk0YUl/o5KeAb10mV/23mdpctXxr4D1X2WTpLGbd6V3TsGbARbiMqLocvt5x R+LbPiLVgV+mh/9/IPGPI2V5O1BzMB1pKqHwZev6SKWi1MxmishR3m2hVNSxG37AXK +c3oIlqB4ofYw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 08/14] irqchip/riscv-aplic, hotplug: Update name & callbacks to match their hotplug states Reply-To: sashiko-reviews@lists.linux.dev To: =?utf-8?b?U3JpdmF0c2EgUy4gQmhhdCAoTWljcm9zb2Z0KQ==?= Cc: linux-leds@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-s390@vger.kernel.org, lee@kernel.org, wsa+renesas@sang-engineering.com, "Heiko Carstens" , "Vasily Gorbik" , "Alexander Gordeev" , "Christian Borntraeger" In-Reply-To: <20261204-fix-cpuhp-state-names-v1-8-32e62361ce1d@csail.mit.edu> References: <20261204-fix-cpuhp-state-names-v1-0-32e62361ce1d@csail.mit.edu> <20261204-fix-cpuhp-state-names-v1-8-32e62361ce1d@csail.mit.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 19:41:41 +0000 X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] irqchip/riscv-aplic: wrong-direction fix retains CPUHP_AP_ONLINE_DYN -- commit 84983784b738af0974edc8b4024cb97a57bc84bd Author: Srivatsa S. Bhat (Microsoft) irqchip/riscv-aplic, hotplug: Update name & callbacks to match their hotplu= g states This commit renames the RISC-V APLIC direct-mode CPU hotplug state and callbacks to match their current registration at CPUHP_AP_ONLINE_DYN. > diff --git a/drivers/irqchip/irq-riscv-aplic-direct.c b/drivers/irqchip/i= rq-riscv-aplic-direct.c > index bfd11a8843164..2b58db452824e 100644 > --- a/drivers/irqchip/irq-riscv-aplic-direct.c > +++ b/drivers/irqchip/irq-riscv-aplic-direct.c > @@ -181,7 +181,7 @@ void aplic_direct_restore_states(struct aplic_priv *p= riv) > aplic_idc_set_delivery(per_cpu_ptr(&aplic_idcs, cpu), true); > } > =20 > -static int aplic_direct_dying_cpu(unsigned int cpu) > +static int aplic_direct_cpu_offline(unsigned int cpu) > { > if (aplic_direct_parent_irq) > disable_percpu_irq(aplic_direct_parent_irq); > @@ -189,7 +189,7 @@ static int aplic_direct_dying_cpu(unsigned int cpu) > return 0; > } > =20 > -static int aplic_direct_starting_cpu(unsigned int cpu) > +static int aplic_direct_cpu_online(unsigned int cpu) > { > if (aplic_direct_parent_irq) { > enable_percpu_irq(aplic_direct_parent_irq, > @@ -314,9 +314,9 @@ int aplic_direct_setup(struct device *dev, void __iom= em *regs) > * interrupt on all CPUs > */ > cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, > - "irqchip/riscv/aplic:starting", > - aplic_direct_starting_cpu, > - aplic_direct_dying_cpu); > + "irqchip/riscv/aplic:online", > + aplic_direct_cpu_online, > + aplic_direct_cpu_offline); > } > } [Severity: High] Should the state/name mismatch from 2333df5ae51e ("irqchip: Add RISC-V advanced PLIC driver for direct-mode") be fixed by moving registration to a static starting state instead of keeping CPUHP_AP_ONLINE_DYN? On CPU offline, aplic_direct_cpu_offline() masks RV_IRQ_EXT at CPUHP_AP_ONLINE_DYN while wired APLIC interrupts still target the CPU. Migration only runs later at CPUHP_TEARDOWN_CPU (__cpu_disable() -> irq_migrate_all_off_this_cpu()), risking I/O stalls or hotplug deadlocks. Symmetrically, on CPU online, smp_callin() marks the CPU online and CPUHP_AP_IRQ_AFFINITY_ONLINE can route APLIC interrupts to it before aplic_direct_cpu_online() unmasks RV_IRQ_EXT at CPUHP_AP_ONLINE_DYN. Adding a static CPUHP_AP_IRQ_RISCV_APLIC_STARTING state (as in irq-sifive-plic.c, irq-riscv-imsic-early.c, and irq-aclint-sswi.c) would fix the ordering and avoid consuming a CPUHP_AP_ONLINE_DYN slot whose return value is ignored. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204-fix-cpuhp-= state-names-v1-0-32e62361ce1d@csail.mit.edu?part=3D8