From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158]) (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 2580E1FCFE5 for ; Mon, 27 Jan 2025 10:27:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737973648; cv=none; b=VSFFjJ2ZfuKHFaVwzOPZkhB7k/SzgcXo9rfzzsKklD04m1yLtv5KezcorS3oB5IIw1GTUk416BbzPem4fV2MvZqdgG5p0nBNcU72+vOKee8VmCxGQ+b9/Jo0f9DQPSYmUS93JdQN1UG5TR8rsRg17itr/FarA2hpfQ1WZ5I01Vc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737973648; c=relaxed/simple; bh=YIpXvF8fL9V/uzbl1/Use/Q1VvmZzRD9cPo06nzEbQM=; h=MIME-Version:Date:From:To:Cc:Message-Id:In-Reply-To:References: Subject:Content-Type; b=r8WD+Yst/Vz2zScVzGfI4YY6wP5/FhiG1/9Xh+9lFO8M9uNNswdEagE9ULEk3EhNb8EQwKeH8NpS+6sxZblZUhJgUa52XOdr6s2D4SxocCC3JBKCXn5GuOiPNZ6N2SupVMxDI3WF01mDXnsOtcruOeZd85OcC5thH83wb/lO4Tc= 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=GdpLXjd5; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IxZb36Up; arc=none smtp.client-ip=103.168.172.158 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="GdpLXjd5"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IxZb36Up" Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id C0CA31140217; Mon, 27 Jan 2025 05:27:24 -0500 (EST) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-10.internal (MEProxy); Mon, 27 Jan 2025 05:27:24 -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=1737973644; x=1738060044; bh=Ss2jecsiCbzsj6YgSzYEjm79AY1xhItf/g+JZQdau8Y=; b= GdpLXjd5BhRQr8xbvNJY2RLk87nfwlADuU2jEr6Pelx9J6atRoYm7+rIzkm2f+SL 9Zc+ONA08IBHLKt0vOSQQubXIQmVllOopd1bS/0Mjl0ZoG9n+1AL1ZDJWla37ETL +ebPxSehj8tTuLjIIMorlzG4jq2ebgssdtWkkqpFm1HYn2mzQhFjEpFDb/owhAm8 Z2sHeFdVm1LBmz2uouHUHU/EPVwey0EEdhjWwm+OothQlNcwdb0uH0oPRfRlzO34 4ZuW3ANpEu6goQfzi7eNQ7HzPy1zq90+vD5kCCXwQFLPXPaTFz6vDAZaBb6+71bU L8C2jluEQrf1zPMfMFDQeA== 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=1737973644; x= 1738060044; bh=Ss2jecsiCbzsj6YgSzYEjm79AY1xhItf/g+JZQdau8Y=; b=I xZb36UpfTttkxmzWrqYdBC749aqlnJJPY22bJNVnLgypezYc/JTunK4KGtVHlpOp 4mbZ2bQIQTeRRLzRnfNuxCxyottEu5fNG4awXwMX3AkokBXeohpUYWA8z4idodsv TeMhWcDoq0x+vg4BIH210yhBp6Bw0SMwpdwWjdqIG8f0FjieUCpDB1UO+9LB/7IB ebOUqAspmQbmDUCi6Gxn2P1lzf4qPs7mUeWqt/E6cv/kweUY146lC2axRPjZG1Ay FAdO5gzBy3UdpBYe3sJE5JJw5tJpP8g97FbIDY2e3GIha92OhgxElgX3PCxUIiba jri6nQZhCjnUmkcMkX6Ew== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudejgedguddvleefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtjeertder tddtnecuhfhrohhmpedftehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnug gsrdguvgeqnecuggftrfgrthhtvghrnhephfdthfdvtdefhedukeetgefggffhjeeggeet fefggfevudegudevledvkefhvdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrg hmpehmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprghkphhmsehlihhnuhigqdhfoh hunhgurghtihhonhdrohhrghdprhgtphhtthhopehjuhhlihgrnhesohhuthgvrhdqlhhi mhhithhsrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkh gvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 4AEBC2220072; Mon, 27 Jan 2025 05:27:24 -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 11:27:02 +0100 From: "Arnd Bergmann" To: "Julian Vetter" , "Andrew Morton" Cc: linux-kernel@vger.kernel.org Message-Id: <1db6ef22-453e-4d31-a643-8e6f84a025e4@app.fastmail.com> In-Reply-To: <20250127100407.866238-1-julian@outer-limits.org> References: <20250127100407.866238-1-julian@outer-limits.org> Subject: Re: [PATCH] Add io_sync stubs to generic IO memcpy/memset Content-Type: text/plain Content-Transfer-Encoding: 7bit On Mon, Jan 27, 2025, at 11:04, Julian Vetter wrote: > The recently added IO memcpy and memset functions lack support for > barriers or other sync functions before and/or after the transaction. To > convert more architectures to use the generic IO memcpy and memset > functions, add empty __pre_io_sync and __post_io_sync defines that can > be overwritten by individual architectures if needed. > > Signed-off-by: Julian Vetter > --- > lib/iomem_copy.c | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/lib/iomem_copy.c b/lib/iomem_copy.c > index dec7eaea60e0..2e81182dd4d3 100644 > --- a/lib/iomem_copy.c > +++ b/lib/iomem_copy.c > @@ -9,6 +9,14 @@ > #include > #include > > +#ifndef __pre_io_sync > +#define __pre_io_sync > +#endif > + > +#ifndef __post_io_sync > +#define __post_io_sync > +#endif I think we should define what these barriers are supposed to do exactly, and how they relate to the __io_br/__io_ar/__io_bw/__io_aw ones include/asm-generic/io.h. Depending on what the barriers are meant to do, we probably want to either use the existing ones directly or use a similar naming scheme. Arnd