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=1796009223; b=2gRLQ7YNgfWgCo6XeGz3lqzQNO/2gH375viRKK4rdIhYL6ILdtbdPwBgoAtV5DIoWR+x QXBUzd3Xl6zopEthmdwVvevGhrfKRapHWM1l3XkPclll8qr2kw5KT9ssrNWOPqNWx0Hmc Nz6vHDQh9wI6w3kIHoeJAGPdTaTtbfwgmaE7b6BO17gxtA5ZAx57WgwMqytpABLJrlmAA dg6SU8v4VwjFej6QmnPwQLC0bVqe2OWjKn1cRo9LZU7cYKFEaYkDTjzDPXdq/QyeFtwVQ JXG4Fj60U8dZMLHYhQoFpcUdT3Ap5jUronqyLKFPMSvRsy1IwwBHEtZQkiswo6GZIMw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796009223; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=c+y5YbuHh+l83CfPuP+XAmT+DB2dHCr6aa6p9dtz8zI=; b=tc1QFowGZt+AqP6BltCkIKbb2XrsknzavWN9OnRcVvcQxa4OVEaBDMSRzGXNfqwqeQTy x1J9ElrYYTpr/XoJsQURdFs6DE5TNLnZ7ouwVDdFBCM6N398jawWsCrQpPv1Un5+pjAbo NX9udjv+6t2D0PTy32SrNkieBIQaW9YS9JPoZH+9PZMZhL1Hj09r/CX//1QKof8Ut0XX+ SgFEukZj1v9pYBuzlR4HTKX71qzBZ1ROG82HFOxFXkHSKUs8JyDhm+bSJSn9wmyPatZbl O0xjqo5075GKe3T6wg9Rulg/GAILIjp/q6+4wkPe2gJNqZlH4TXA/AYBIgc4l1zlVWg== 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=GdhzuNut; 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 EBC83606A31C; Mon, 30 Nov 2026 03:27:02 +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=GdhzuNut Received: by smtp.kernel.org (Postfix) with ESMTPSA id EC72E1F000C1; Mon, 30 Nov 2026 03:27:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796009222; bh=c+y5YbuHh+l83CfPuP+XAmT+DB2dHCr6aa6p9dtz8zI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=GdhzuNutwT2CXsUiwFDOuQxFD7KfEvHQvHIklFZbVBmvj5lds7wArKWS9qIXXht44 G+DHqIx2un8+Ktl3rVW/B9omA8U/RCWQDhsg1EHhrnA09kWQjjvdyLQyABu4zKyzq3 n5v9rYDxVT+yVIv9FtXzDL7n4GkFMrV3TJUUaR2YAmtkYbkalyK0YzBeXl4b7K03Wf kbsCN9msTLltoW3VfJShtWkQM5EwIzu/T+bJY/MHwqB7E4Jgih5vjetmevBR6uZtwJ b407hzaWDbaT4FJ8UlPADk3LPLCRZMWbWBpRIhkQ5nLcNKIEraD7YNKZZyZtfwHSlW 9vI7x3WlGMiZA== Date: Sun, 29 Nov 2026 19:26:58 -0800 From: Drew Fustini To: "GUO Ren (XuanTie)" Cc: Han Gao , Inochi Amaoto , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Arnd Bergmann , Chen Wang , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, sophgo@lists.linux.dev, Alexandre Ghiti , Leonardo Bras , Yao Zi , Chen Wang , Xiaoguang Xing Subject: Re: [PATCH v8] riscv: errata: Add C-SKY ERRATA WRITE_ONCE fixup Message-ID: References: <20261130-write_once-v8-1-3e98413e2d4c@kernel.org> X-Mailing-List: linux-arch@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261130-write_once-v8-1-3e98413e2d4c@kernel.org> On Mon, Nov 30, 2026 at 01:58:35AM +0000, GUO Ren (XuanTie) wrote: > The early version of C-SKY C910 core has a store merge buffer It is confusing to me that this now says C-SKY. If it is going to be changed from the previous revision, then I think there needs to be an explanation. It is not clear what the difference is between T-HEAD and C-SKY. > delay problem. The store merge buffer could improve the store queue > performance by merging multi-store requests, but when there are not > continued store requests, the prior single store request would be > waiting in the store queue for a long time. That would cause > significant problems for communication between multi-cores. This > problem was found on sg2042 platform with the qspinlock lock torture > test. > > So appending a fence w.o could immediately flush the store merge > buffer and let other cores see the write result. > > This will apply the WRITE_ONCE errata to handle the non-standard > behavior via appending a fence w.o instruction for WRITE_ONCE(). > > This problem is only observed on the sg2042 hardware platform: it > takes hours of locktorture stress testing to trigger the livelock > once, and an interrupt can break the livelock. No user space > application has been observed to hit this problem, so there is no > need to modify user space WRITE_ONCE(). The vDSO code runs in user > space context as well, so its WRITE_ONCE() does not need the errata > fence either. > > Acked-by: Arnd Bergmann > Reviewed-by: Alexandre Ghiti > Reviewed-by: Leonardo Bras > Reviewed-by: Inochi Amaoto > Tested-by: Han Gao > Tested-by: Yao Zi > Cc: Chen Wang > Cc: Xiaoguang Xing > Cc: Paul Walmsley > Cc: Drew Fustini > Co-developed-by: Han Gao > Signed-off-by: Han Gao > Reviewed-by: Drew Fustini > Signed-off-by: GUO Ren (XuanTie) [..] > diff --git a/arch/riscv/Kconfig.errata b/arch/riscv/Kconfig.errata > index 4f77b3c6d7fd..dfa99f1cfd4e 100644 > --- a/arch/riscv/Kconfig.errata > +++ b/arch/riscv/Kconfig.errata > @@ -179,4 +179,22 @@ config ERRATA_THEAD_GHOSTWRITE > > If you don't know what to do here, say "Y". > > +config ERRATA_THEAD_WRITE_ONCE > + bool "Apply C-SKY WRITE_ONCE errata" Also, here it is ERRATA_THEAD_WRITE_ONCE but "C-SKY WRITE_ONCE" Thanks, Drew