From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a1-smtp.messagingengine.com (fout-a1-smtp.messagingengine.com [103.168.172.144]) (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 286B418A6A1 for ; Mon, 27 Jan 2025 19:08:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.144 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738004901; cv=none; b=bjSVOEwwPgcE3f1zMcWtWA7XHgpEP5HKKreRnPZc7bPrylylFn+zQQxdcWJc0A5lvXp5a3AYIoEXv837Bt3l3shbJUvPTW5+KRbumvvqsYoedF/RLr7ZuqYiRpvg8SB87Mjftn9EsQeIzyN8YBXGAQIlaOz2d3oNs+UYvXKzCZ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738004901; c=relaxed/simple; bh=mx/iFdVlkA2I99Usq5LzZkF7VcvSenBqCz2daBmNcmg=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=kU9+KM7CK+OzOvDM/Z/FYBErHvu6+kZdWyg860uQdgs9oxgczXqY1hFS/mxT/U/3XhBbtobmKrhn2TvoJ3JtStqGnxfMlKELazcCDdLo4pO8cyTrWTavf5c0wczxgg7BsQ6Dcp9QToVUpGF519vHCmlzJLJnKwq+i3YmOK4YWD0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de; spf=pass smtp.mailfrom=arndb.de; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b=dsMJ+KQ1; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=fT0W1VcR; arc=none smtp.client-ip=103.168.172.144 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arndb.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arndb.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arndb.de header.i=@arndb.de header.b="dsMJ+KQ1"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="fT0W1VcR" Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id E5C2713801E4; Mon, 27 Jan 2025 14:08:16 -0500 (EST) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-10.internal (MEProxy); Mon, 27 Jan 2025 14:08:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1738004896; x=1738091296; bh=aNIlcLxpP3HWGgVehSuZiQmwJIwQ6YhjQD/tEwRT0VU=; b= dsMJ+KQ1UObgJ/MqTs6J1bx7Zk5D7BtD15QjgB3rOgdSuSyGaYhhdbFxFwv8QirE NxdQXgnphOH28kQ+qXKYYt9oDKjJcV56JEkPFzFxqcrBfmxRzOm3a48ZlFXgojpA 0FTlu0VVL7Qn5qXxJtQBS89kvKq7uSApb2vUVMNR9J3ZR6/uqhc1hGXebITv6fBM T4hRpg2VQZgwp1P4m49YFrZ2jkJeNL9PmzkSKPX+meIlY75CaSnLRAzFWHgKahCX ByRk8MGU6w4L+RZilyLWnuQffEMQo3B4pgodVoCulsVwDTQl4wKKtQ/X1zthqJAc SSQZiPISlHd79v1tUMsrQg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1738004896; x= 1738091296; bh=aNIlcLxpP3HWGgVehSuZiQmwJIwQ6YhjQD/tEwRT0VU=; b=f T0W1VcRMmcAHXraqwVfvh929Ww/zPRoaoHfE+7R5VZ7ddGfTsBuAd8pQmahKcMEl swVqrXtRYnIonWlBnOCIJxeV+YMdZRY1Nwu07rycBNihQ40rtQ56zdu+ZHw+c4Q/ AjVir+jkLlb1RhEzuYs9TVQq+75Vt+jc6bDb6unGggYRW0fYuJwMm+qnUbK87U4o nZhuAUl/ghRlUMRPfeHHdA6cK5TozE5VguUkL7jvcG0ZGxhKZj256MHZipMCuoFA dfXBm0cbwJUkEM8jI8QzH6hBFFVyyI0Osn9I710TKtchTV1iKUFwa5kfG5ZJp9lo RVcuWV5Ir+cSVpE+3So/g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedgudefleekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtqhertder tdejnecuhfhrohhmpedftehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnug gsrdguvgeqnecuggftrfgrthhtvghrnhepvdfhvdekueduveffffetgfdvveefvdelhedv vdegjedvfeehtdeggeevheefleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohep uddtpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrnhhuphessghrrghinhhfrg hulhhtrdhorhhgpdhrtghpthhtoheplhhihhgrnhhgjhhinhhgsegshihtvggurghntggv rdgtohhmpdhrtghpthhtoheplhhugihurdhkvghrnhgvlhessgihthgvuggrnhgtvgdrtg homhdprhgtphhtthhopeigihgvhihonhhgjhhisegshihtvggurghntggvrdgtohhmpdhr tghpthhtohepphgrlhhmvghrsegurggssggvlhhtrdgtohhmpdhrtghpthhtohepthhglh igsehlihhnuhhtrhhonhhigidruggvpdhrtghpthhtoheplhhinhhugidqrhhishgtvhes lhhishhtshdrihhnfhhrrgguvggrugdrohhrghdprhgtphhtthhopegthhgrrhhlihgvse hrihhvohhsihhntgdrtghomhdprhgtphhtthhopehprghulhdrfigrlhhmshhlvgihsehs ihhfihhvvgdrtghomh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id E1A532220072; Mon, 27 Jan 2025 14:08:15 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Date: Mon, 27 Jan 2025 20:07:55 +0100 From: "Arnd Bergmann" To: "Xu Lu" Cc: "Thomas Gleixner" , "Anup Patel" , "Charlie Jenkins" , "Paul Walmsley" , "Palmer Dabbelt" , lihangjing@bytedance.com, "Xie Yongji" , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Message-Id: <7811b481-0227-42bb-a5ce-1d9794f5a196@app.fastmail.com> In-Reply-To: References: <20250127093846.98625-1-luxu.kernel@bytedance.com> Subject: Re: [External] Re: [PATCH RESEND] irqchip: riscv: Order normal writes and IPI writes Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, Jan 27, 2025, at 17:37, Xu Lu wrote: > On Tue, Jan 28, 2025 at 12:23=E2=80=AFAM Arnd Bergmann = wrote: >> On Mon, Jan 27, 2025, at 10:38, Xu Lu wrote: >> >> thead_aclint_sswi_ipi_clear() seems to have the same bug, >> it also uses the _relaxed() version for no apparent reason. > > > There seems no need to modify thead_aclint_sswi_ipi_clear() as it only > clears pending IPI on current hart. No other harts require to see > strict order between preceding memory writes and this ACLINT MMIO > write. Please correct me if I missed anything. My point was that you should always default to the normal operations, since the relaxed ones keep causing problems. If you still think it's important to use writel_relaxed() in thead_aclint_sswi_ipi_clear(), please add a comment explaining how you have shown that it's correct and why it matters, otherwise convert them both. Arnd