Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1023482rwl; Fri, 31 Mar 2023 05:53:45 -0700 (PDT) X-Google-Smtp-Source: AKy350Yf8yhqljYtfv74sfoDg8+iEse6cw4Drg1nQYh5aEwVbANpTaPhQT72vn+OaoueHKir6qjk X-Received: by 2002:a05:6402:524e:b0:4fd:2978:d80 with SMTP id t14-20020a056402524e00b004fd29780d80mr27614308edd.1.1680267225167; Fri, 31 Mar 2023 05:53:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680267225; cv=none; d=google.com; s=arc-20160816; b=zvoM5RI36JBsZBw455YAs0F5xNB0iXQ7kvsZt6fOQU/Gozkuj5GTAdsaU3V2NqEQWG llj/zNrriCRF66HCmp9/IB4N645ae5gjOJkZkWzxlxVdRefgprBlIlZALTSyVRH6YJBI L/pzajZKY7ChJO778Qruq1DCfaaZO6tGLc6aXpsG30U3d1RbLQBNMBzwyXVGFpPd3kEa Tnbv/L+uIzrtEPz78eDB3bSiT5lfAiUElZ19a0xeDfHpqnST3BvlRz1/v+2MRDbH1jn5 qi2pI9eySl0SeKIcht3jAfGrHUC2O6gV9mrK0acAZTgF3boo+Ntq0xmRJNO+ExcduDPi v+4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:subject:cc:to:from :date:references:in-reply-to:message-id:mime-version:user-agent :feedback-id:dkim-signature:dkim-signature; bh=1wl0PaNqVV1tf/UjJBVG7Hr1Nf6zuThoMUuqGEpn1MA=; b=RlY9UY+HWwFCeat5fqU04y8U5OpRwf9JdREStk3QtA1SQU8QA8KVl9d73r8u+m1Ius B+Y9UVqKIM/Nh++f3Q/LIl2g/jGLc/8LuBDaJEHMTCVPoHtaJBUwpj0i4MATMP1MSvyK LSLEIqlOwCGvctYTycDKeR5aZRzeroFMUsvkaGZPBqCmIup1zfsIUxp7WHLNrtLlA2D3 t4kA+U41LnQBbnLu2ulZNItd9ugZGtZ0sZK1QP63S1GWemEt12yNaNcPvPBiIaBy2VqT OwN6PI7+in8IH29yPDl2yeJr477jGFKIaxQoY6qprjadv22eWtWf66AM8eerqpDtvbSD hl0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=BLukJoG1; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=QTw4z9Bq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j23-20020aa7c417000000b004fe903cef94si1985083edq.24.2023.03.31.05.53.20; Fri, 31 Mar 2023 05:53:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=BLukJoG1; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=QTw4z9Bq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231940AbjCaMt5 (ORCPT + 99 others); Fri, 31 Mar 2023 08:49:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231195AbjCaMtV (ORCPT ); Fri, 31 Mar 2023 08:49:21 -0400 Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 332D421A84; Fri, 31 Mar 2023 05:48:57 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.nyi.internal (Postfix) with ESMTP id 9453058267B; Fri, 31 Mar 2023 08:48:56 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Fri, 31 Mar 2023 08:48:56 -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:sender:subject:subject:to:to; s=fm1; t= 1680266936; x=1680274136; bh=1wl0PaNqVV1tf/UjJBVG7Hr1Nf6zuThoMUu qGEpn1MA=; b=BLukJoG1DbMb6R2AbqA/+7JjbZ7Oc/VY/GccCFivK2SLSyJIUDy eDvuj6KlJ9yQrHhbcVFZFc/7GfKYkkIJnc004z0WtfxhzT8F0Dryc/fj4uAQEHP5 0uQBdRp2Y9CzikgGULwwka03ZtEYN+vA0NR1UYoJiMuMTtA+TbmqSw1RKb6bHBwu kgWKCmrmDScSe7b7EAcsyIEqiEeMn1uQFjhnq/BazbUn1vodHcRar+Z8amV+f2ZZ 4SEu3kvSxhj8jR9TWpWv6H7rDT3W+eYIj1h32pDouk8U16vHi7UxgZYWiVlTR8pm cvHgSREjUd2DJv11jgWTdKV0doKNHN4KAQQ== 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:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1680266936; x=1680274136; bh=1wl0PaNqVV1tf/UjJBVG7Hr1Nf6zuThoMUu qGEpn1MA=; b=QTw4z9BqGCp34jRTQ9lJ0Te2z7DjXCcjR1cRFuymA6teq1Ue47T RfmowyRx6v1MwMbGt3ApYDk7qwSROS25JV78fgnvrSJIUz/j3GedCAWFmvE8DLl3 HoMeyCJb5WbZ+f8j44/HhL12AZyMqN3xRjT/IDdrxGjXOHILLMDS4nNm1QNzKgnt FLCEk9P9FtfqKPKXWuMbSuG7oHcgCKFsVXQhQDt+sRTlprJiPAhFBhU6avHf2Ete uaofk0N4pXe1j7VHba5yYeMGTXuCjt30lCiXSGhI7m4EIcITbbYAAY9vnjAdi0d+ SAs1yBNQ6aJg2m3zpufn0UV2fnpNcc/oKsQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeiuddgheefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvfevufgtgfesthhqredtreerjeenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeegfeejhedvledvffeijeeijeeivddvhfeliedvleevheejleetgedukedt gfejveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B8952B6008D; Fri, 31 Mar 2023 08:48:54 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-238-g746678b8b6-fm-20230329.001-g746678b8 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20230327121317.4081816-1-arnd@kernel.org> <20230327121317.4081816-18-arnd@kernel.org> Date: Fri, 31 Mar 2023 14:48:34 +0200 From: "Arnd Bergmann" To: "Linus Walleij" , "Arnd Bergmann" Cc: linux-kernel@vger.kernel.org, "Vineet Gupta" , "Russell King" , "Neil Armstrong" , "Catalin Marinas" , "Will Deacon" , guoren , "Brian Cain" , "Geert Uytterhoeven" , "Michal Simek" , "Thomas Bogendoerfer" , "Dinh Nguyen" , "Stafford Horne" , "Helge Deller" , "Michael Ellerman" , "Christophe Leroy" , "Paul Walmsley" , "Palmer Dabbelt" , "Rich Felker" , "John Paul Adrian Glaubitz" , "David S . Miller" , "Max Filippov" , "Christoph Hellwig" , "Robin Murphy" , "Lad, Prabhakar" , "Conor.Dooley" , linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, "linux-oxnas@groups.io" , "linux-csky@vger.kernel.org" , linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, "linux-openrisc@vger.kernel.org" , linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org Subject: Re: [PATCH 17/21] ARM: dma-mapping: use arch_sync_dma_for_{device,cpu}() internally Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 31, 2023, at 11:10, Linus Walleij wrote: > On Mon, Mar 27, 2023 at 2:16=E2=80=AFPM Arnd Bergmann wrote: > >> From: Arnd Bergmann >> >> The arm specific iommu code in dma-mapping.c uses the page+offset bas= ed >> __dma_page_cpu_to_dev()/__dma_page_dev_to_cpu() helpers in place of t= he >> phys_addr_t based arch_sync_dma_for_device()/arch_sync_dma_for_cpu() >> wrappers around the. > > Broken sentence? I've changed s/the/them/ now, at least I think that's what I meant to write in the first place. >> In order to be able to move the latter part set of functions into >> common code, change the iommu implementation to use them directly >> and remove the internal ones as a separate interface. >> >> As page+offset and phys_address are equivalent, but are used in >> different parts of the code here, this allows removing some of >> the conversion but adds them elsewhere. >> >> Signed-off-by: Arnd Bergmann > > Looks good to me, took me some time to verify and understand > the open-coded version of PFN_UP() and this refactoring alone > makes the patch highly valuable. > Reviewed-by: Linus Walleij Thanks! ARnd