From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F990CF31B7 for ; Wed, 2 Oct 2024 12:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:Subject:References:In-Reply-To:Message-Id:Cc:To:From:Date: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TvtI6Ymi0iDeCpT2LstG1I5T9nQfjnvieONHI8z8hs4=; b=qEcmBil/rfczto0mHkaPMhSdV3 TDUOct6vLZhYTALP9W81IvEfbpgj3CHEdzj/Cvuh9mFDamaJu72UNFZMR0jF11Ck6LO1tjDBMnOBc thnqwoMEsQz9WZNPCzqjSRh7Ynm2e4lbIFy6KopCu/bZ/UO2QW5HUuxQTh3IzozB7JCi4b5/s/jeS rIUBJOfOhJNcozye1nKHtNPii/akwc1yCmdZzPr4sNRGh43ymEQZgYhe6ml5MYCabKm5cztPow5/V UFmDYRcXE08FE8pDezOIhoZ9zWKrP30lPOm6dndKMdpzVtoLoM7EK7hr9iq55wVVE09zwmcLGpwtb i/Ni6/ow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1svy22-00000005lKM-02Ky; Wed, 02 Oct 2024 12:00:38 +0000 Received: from fhigh-a7-smtp.messagingengine.com ([103.168.172.158]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1svxtQ-00000005j56-2r7y for linux-arm-kernel@lists.infradead.org; Wed, 02 Oct 2024 11:51:46 +0000 Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.phl.internal (Postfix) with ESMTP id 1AA8F1140138; Wed, 2 Oct 2024 07:51:43 -0400 (EDT) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-10.internal (MEProxy); Wed, 02 Oct 2024 07:51:43 -0400 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=fm1; t=1727869903; x=1727956303; bh=TvtI6Ymi0iDeCpT2LstG1I5T9nQfjnvieONHI8z8hs4=; b= K/dTrnka/hetRBWZVfTAABVrvz4BkyWQ0zqvYdFRpUVO7Qsfvz4wK9o0xA1uwhhz cW0/k+nFWpl+7qaAe7uVc2pnjuObZKrqdewym9S4ZhxvxKMe+0OyH3i97/ndugNb 0I75ii4zqq70jjepx4yplenYFfz2V8r/ww6s+QIE2bRNDbHVO2bqhGiC2y4S6tXw Ha7OnjtafX4XooHWeZo4zK2hPCqDOwNR8YemgGKm5Js17eIlDFbLI9L2r4FzKYbU 7kFSFnola/zK6La+mJHDBUgCT/76fSg23vvKqIVAj7dNOKhOlky/MJSfEQ/4keLn E/F3IVWcrBERyKZ7ocgoiw== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1727869903; x= 1727956303; bh=TvtI6Ymi0iDeCpT2LstG1I5T9nQfjnvieONHI8z8hs4=; b=g 1iFVfSymhdUiDg2h4Hh7Jlt1KZWZCrlV8hbT52rcnP0NI56t7pH5vrRe4QkOdhnx bfTG8x2vBeeQvJpWGCJV12bv2/74/tUVw08+MyZz5RuwyKSIk6LYtpGSn7SuTWFl Gy/PHwh1rFzTqZKFTUdtH04dfnoE0zh04VC1MFBQ0g7tD0fKrR4Sp1ds9480UShe L8nMUDOyV7HOOkUkwCWbEVT1t3IHhontRQajlO3emvHV9nOeJBo6nXZBOmy5LK/k Famk6JYoGaU87Maqb1EeL5uknTPNYI0V02TbO+2ZtPUS2+k3Lb77utOgYdo2dM0w cRrKugt75WsGKAxuo/fmw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdduledggedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddt necuhfhrohhmpedftehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrd guvgeqnecuggftrfgrthhtvghrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefg gfevudegudevledvkefhvdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepudeg pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegvihgthhgvshhtsehgmhgrihhlrd gtohhmpdhrtghpthhtohepfhgvshhtvghvrghmsehgmhgrihhlrdgtohhmpdhrtghpthht oheprghnughirdhshhihthhisehkvghrnhgvlhdrohhrghdprhgtphhtthhopehshhgrfi hnghhuoheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrghrmhdqkhgv rhhnvghlsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtohepihhmgi eslhhishhtshdrlhhinhhugidruggvvhdprhgtphhtthhopehfrhgrnhhkrdhlihesnhig phdrtghomhdprhgtphhtthhopehkvghrnhgvlhesphgvnhhguhhtrhhonhhigidruggvpd hrtghpthhtohepohdrrhgvmhhpvghlsehpvghnghhuthhrohhnihigrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 5BDD92220071; Wed, 2 Oct 2024 07:51:42 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Wed, 02 Oct 2024 11:51:22 +0000 From: "Arnd Bergmann" To: "Stefan Eichenberger" , o.rempel@pengutronix.de, "Pengutronix Kernel Team" , "Andi Shyti" , "Shawn Guo" , "Sascha Hauer" , "Fabio Estevam" , "Frank Li" Cc: linux-i2c@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, "Francesco Dolcini" , "Stefan Eichenberger" Message-Id: <6b070948-cf02-4f13-a220-0f6cfa21c41a@app.fastmail.com> In-Reply-To: <20241002112020.23913-4-eichest@gmail.com> References: <20241002112020.23913-1-eichest@gmail.com> <20241002112020.23913-4-eichest@gmail.com> Subject: Re: [PATCH v4 3/4] i2c: imx: use readb_relaxed and writeb_relaxed Content-Type: text/plain Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241002_045145_263630_4C8E300B X-CRM114-Status: GOOD ( 11.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 2, 2024, at 11:19, Stefan Eichenberger wrote: > From: Stefan Eichenberger > > Use the relaxed version of readb and writeb to reduce overhead. It is > safe to use the relaxed version because we either do not rely on dma > completion, or we use a dma callback to ensure that the dma transfer is > complete before we continue. I would still consider this a bug in general, you should never default to the unsafe variants. If there is a codepath that needs the barrierless version, please add imx_i2c_write_reg_relaxed()/imx_i2c_read_reg_relaxed() helpers that use those only in the places where it makes a measurable difference, with a comment that explains the usage. Arnd