From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fout-a7-smtp.messagingengine.com (fout-a7-smtp.messagingengine.com [103.168.172.150]) (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 5EDED1A23A2 for ; Tue, 28 Jan 2025 16:50:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738083035; cv=none; b=cEP1ogb5cXn/QCtdDgAao+dlg8x6k9WCHhS5u4nJgog+13QIAIdxJ18D/+VAE9Qw8dGXhAhTcmkifqQUI9J5wp452K9jyLtKFadRxgFhDi0bcy8h1NAhCprAez5kHaMypUM4fC0hVfdQ4lfHaQyGfiQ2NFgp4UFho6rvcmievd8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738083035; c=relaxed/simple; bh=lVelC+Vvfauh1IkQQYVaVdw3t0YKrITNF0v/2wC5nX4=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=rU/NqL5FrjfeucbbJEll8l0iCOAh347ai8am5/AyRtRL1ehVz+ER54lyZ4m4DpST87PaKjO4H0JsQkiy42isHFWHp9x6yj42b8QYFd+s3/BISQsbntniTd6ZWQmFmfMZxLdnKrHpeRPpZqHYzJb++7ujYlhGwXuJ/4yoYPVoCeE= 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=Xs1MOD1h; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=blxlI+BI; arc=none smtp.client-ip=103.168.172.150 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="Xs1MOD1h"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="blxlI+BI" Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.phl.internal (Postfix) with ESMTP id 264641380B4D; Tue, 28 Jan 2025 11:50:31 -0500 (EST) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-10.internal (MEProxy); Tue, 28 Jan 2025 11:50:31 -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=1738083031; x=1738169431; bh=OzTrdvDmHfPKu0sUzo1rmLrtHAI4LwDlupmzRk1iyUc=; b= Xs1MOD1hAWlkW6H3OB6yyyInUaeIzxm0KnxqbO43608ECInLPAiYJDWeTk2ezJN9 Wy9fHNMoPHZFHRD5crE6iVUJkqrsfSlV835z8eSQTTOKDWJTVbYI6N6qApQt2Q5j EY8SS8E0YMlKa51aEuZQcYOQvj+K+qbDeUDZfFpONS2ZzlX+qJJfeHhHjMOqqTdP pvD19SE9F8/zM89KcqNg2uH3EAEe47D7U62y7pYmm5tKVRTpejVP47kBUQfqPfDS kqPyKBc4GXZsZzejGEAKOj0jiokRvHEXqOIC+riop8s2SfIyH56OpYPDVV/3WJsb m6tQMiMnl74Z8aeqDAjeSw== 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=1738083031; x= 1738169431; bh=OzTrdvDmHfPKu0sUzo1rmLrtHAI4LwDlupmzRk1iyUc=; b=b lxlI+BIK7OxBOxZOvsIwIdol/v9S4wFeSUAQgVLyQHYqjzPOO5GwoCaVi9XPwgGT Wk21iOoNwT/whoBN+tJQ8neEx5lYfF87ddjHyaciJZsvHaz7NNy3rv131qpe8jPu Ey82gxskXBHUL8jZ/uvmU6hubxgX5LOHESmwDWhvaLUAy7UF52VG1wxzkaxT7Z9u pm4f2xJ6uEZoPf1JGjEtv62ThvCl58kYHXMQQYR4F7r2mk+9dnBAjPhQB1erX+jF r7k3A/JuG/kQ9LhyApIOEqPJXvBqyDWB17dDi6UwNFqXgTognmFAn1DjvyoKss7A UvG7/4DzV+Cnw5enFS1lA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeivdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefoggffhffvvefkjghfufgtgfesthhqredtredtjeen ucfhrhhomhepfdetrhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdrug gvqeenucggtffrrghtthgvrhhnpedvhfdvkeeuudevfffftefgvdevfedvleehvddvgeej vdefhedtgeegveehfeeljeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegrrhhnugesrghrnhgusgdruggvpdhnsggprhgtphhtthhopeekpdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopegthhhrihhsthhophhhvgdrlhgvrhhohi estghsghhrohhuphdrvghupdhrtghpthhtohepmhhpvgesvghllhgvrhhmrghnrdhiugdr rghupdhrtghpthhtohepnhhpihhgghhinhesghhmrghilhdrtghomhdprhgtphhtthhope hnrghvvggvnheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepmhgrugguhieslhhinhhu gidrihgsmhdrtghomhdprhgtphhtthhopehlihhnuhigphhptgdquggvvheslhhishhtsh drohiilhgrsghsrdhorhhgpdhrtghpthhtohepjhhulhhirghnsehouhhtvghrqdhlihhm ihhtshdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvg hrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 3C5F62220073; Tue, 28 Jan 2025 11:50:30 -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: Tue, 28 Jan 2025 17:50:09 +0100 From: "Arnd Bergmann" To: "Christophe Leroy" , "Julian Vetter" , "Madhavan Srinivasan" , "Michael Ellerman" , "Nicholas Piggin" , "Naveen N Rao" Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Message-Id: <9fc9a994-b6cf-4ad9-9cec-6777dedd216d@app.fastmail.com> In-Reply-To: References: <20250128135711.1625747-1-julian@outer-limits.org> <81ee3098-1e43-4b88-975a-d223bc2338e8@csgroup.eu> Subject: Re: [PATCH] powerpc: Remove eieio in _memcpy_fromio Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Jan 28, 2025, at 16:34, Christophe Leroy wrote: > Le 28/01/2025 =C3=A0 16:24, Christophe Leroy a =C3=A9crit=C2=A0: >> Le 28/01/2025 =C3=A0 16:07, Julian Vetter a =C3=A9crit=C2=A0: >>> With 'ppc' I was refering to 'include/asm-ppc/io.h'. But you're righ= t, >>> when going back a bit, in the 'include/asm-powerpc/io.h' there are t= wo >>> cases, one (eeh_memcpy_fromio) which does the the 'eieio', and a sec= ond, >>> i.e., 'iSeries_memcpy_fromio' which does a byte-wise copy. But in the >>> ppc code ('include/asm-ppc/io.h') there is a simple memcpy. I was >>> referring to this one. But my description is not very clear. Sorry f= or=20 >>> that. >>=20 >> But then is your change still valid ? Isn't there some corner case th= at=20 >> still need it ? Is it a valid argument that because memcpy_toio()=20 >> doesn't need it memcpy_fromio() doesn't need it either ? > > I see that _insb(), _insw_ns() and _insl_ns() also have eieio() while=20 > _outsb(), _outsw_ns() and _outsl_ns() don't. Why not change those as=20 > well if you think eieio() is not needed ? I think that makes sense, even if it's beyond the scope of Julian's work to unify the memcpy/memset I/O helpers across architectures. I looked into the pre-2.6.12 history of arch/powerpc64 to see how the eieio got in there originally and found that at the time the string functions got added, this is what the readl() etc functions did. readl() itself went through a longer set of changes to end up with the current sync/twi/isync version, but the string functions were never updated again during any of the later changes. The bit that needs to be captured in the changelog here is that on all other architectures, strcpy_fromio/strcpy_toio are written to allow prefetching/combining/reordering, while the powerpc version prevents this in strcpy_fromio for apparently only history reasons. Arnd