From mboxrd@z Thu Jan 1 00:00:00 1970 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 83CA7288C2D; Tue, 6 Oct 2026 09:39:00 +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=1791279542; cv=none; b=BOsWhnbEIcX3Nm9sBjHgjNzvNI8AdJAp4+5SO+9yHunk6Yk/pfnqCVpse0F0Vti9aZYCJg9+FQc9mj6xBBCnS4fu4/mW+X25hLotGj1arSUSlLgDwlTo/7C8uAU+3okl4jBhSaraQj/tMx+dWtYvX44hcAk0Y550Y5N7ZKSv4CA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791279542; c=relaxed/simple; bh=xHIKDl1YOdzR9stjV+DQinnaatuz7Z0o6g8GMagiQtg=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=HXm+JE5lgA6LoUG9g+05c2CLOCkAzMyUh+QfCpLBwnvy6WsxvABTotllRUikzbc4mkk/mJq3wnwClkUwL5WhBqNUgipLnlRKSjm8C8a98bBLbommn62ITEZ5QpKSRnWu5X84v9tuPSJunNVDakAMChuRRc1QKgS4kbEZr7S9irk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kDru/Ioz; 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="kDru/Ioz" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2C6F1F000FF; Tue, 6 Oct 2026 09:39:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1791279540; bh=O9HJH+uXkT13MNQK1cMIvKlsgzXLnzAXDk7pgKiWtZY=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=kDru/Ioz3ij+3dRZx740U4Gb2cGeu3UNTE4DQltvVbtA/ea6TUMkTYu/uB5G+yg9E 3ZUXnlLTdBiCb6+KKvAJwkpdlI1udbxgfiacsddel5nbrfh1hr6XPp9RpRgQaxgLul HnwJHiRPtKNGE9DPC7ZfgIJy8AjOA56x36cOTH5nAdemdgkimQIyOm8HLxeMFijXiM 4QTvldbbnaN3eGZiN6zodlweXqAdhtJzDumYFFt+C6NV3iCqG1scgCmxxNpOfjnDTQ 8FM/zKBxkZ1rZjhEy2RDgXxRpj2kwvkFCC5tR0JgxnTS6Z4gz1NUhVY9FPCblWyUxI H0h68H5qx2qPw== Received: from sofa.misterjones.org ([185.219.108.64] helo=lobster-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xE1dS-0000000HMXc-1zsb; Tue, 06 Oct 2026 09:38:58 +0000 Date: Tue, 06 Oct 2026 10:42:06 +0100 Message-ID: <878q4b2mj5.wl-maz@kernel.org> From: Marc Zyngier To: Kohei Enju Cc: Tomohiro Misono , Catalin Marinas , Will Deacon , Mark Rutland , Jonathan Corbet , Shuah Khan , Randy Dunlap , Thomas Gleixner , Radu Rendec , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 4/4] irqchip/gicv3: Add workaround for FUJITSU-MONAKA erratum E#030003 In-Reply-To: References: <20261002-monaka-fix-for-upstream-v1-0-4aec0b0cbe34@fujitsu.com> <20261002-monaka-fix-for-upstream-v1-4-4aec0b0cbe34@fujitsu.com> <86tsn42sqr.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: enju.kohei@fujitsu.com, misono.tomohiro@fujitsu.com, catalin.marinas@arm.com, will@kernel.org, mark.rutland@arm.com, corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org, tglx@kernel.org, radu@rendec.net, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-perf-users@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 06 Oct 2026 10:08:19 +0100, Kohei Enju wrote: > > On 10/02 13:26, Marc Zyngier wrote: > > On Fri, 02 Oct 2026 11:26:52 +0100, > > Tomohiro Misono wrote: > > > > > > From: Kohei Enju > > > > > > On affected FUJITSU-MONAKA CPUs, an SGI generated by writing to > > > ICC_SGI0R_EL1, ICC_SGI1R_EL1, or ICC_ASGI1R_EL1 may be lost if the > > > operation races with CPU interface processing triggered by the arrival > > > of a higher-priority interrupt, an update to a pending interrupt, or a > > > transition of the PE to the Sleep state. When this occurs, the system > > > register write does not complete, causing the issuing core to hang. > > > > > > > Is the SGI lost? Or is the sender core hanging? > > Both: the SGI is lost, and the sysreg write does not complete, causing > the sending core to hang. I don't think the two are distinguishable. You might want to simplify the commit message to simply say that the CPU hangs. [...] > > > + */ > > > + for_each_cpu(cpu, mask) > > > + gic_send_sgi_via_rdist(cpu, d->hwirq); > > > + > > > + /* Force the above writes to GICR_ISPENDR0 to be executed */ > > > + dsb(st); > > > > This doesn't force things to be executed. This is about completion of > > the access, and with an nGnRE mapping, it doesn't enforce that the > > stores actually reach the RDs, only an arbitrary point in the memory > > subsystem. The only way to guarantee this is to perform a read-back. > > Understood. > > I hadn't considered this when writing v1, but on further reflection, I > don't think gic_ipi_send_mask() needs to wait for the target CPUs to > handle the IPIs. It's not about the target CPU handling the IPI, that'd be crazy. It is about making sure that the IPI request has been observed by the HW and that it is not going to race with something else. > Given that the GICv2 driver does not wait for MMIO > write completion either, I don't think we need to ensure completion of > these writes before returning. GICv2 has different architectural requirements (i.e. none). GICv3 is a bit clearer, see the requirements at the end of 12.1.3 in IHI0069H.b. > > If my understanding is correct, I'll remove the dsb(st) in v2. > As indicated in the spec, you either need nGnRnE+DSB, or a read-back. Given that Linux uses nGnRE for all device mappings, read-back is the only option here. Thanks, M. -- Jazz isn't dead. It just smells funny.