Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2682904rdb; Mon, 4 Dec 2023 04:55:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IF2cFmwowxdqQqvIDMjamng1w1LYZ8T2bvWRTVyAKC+fZVji6W9pEApgMPThse8Fm3As3II X-Received: by 2002:a05:6a00:2383:b0:6cd:e101:9db with SMTP id f3-20020a056a00238300b006cde10109dbmr5769565pfc.7.1701694540600; Mon, 04 Dec 2023 04:55:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701694540; cv=none; d=google.com; s=arc-20160816; b=qvZzMJrBKf1VvW+1ffhXJhVGy7PsYVeVFmcQdRlpIzBS9XB3r8doP998l9MjjSJzLg JXvvbFeOVL2GibN0CXM8RkCIwvxpmwDCfPpkRgX1hMOB6E+DWACzlqk/9Js/DgHG+Ns/ j+qQ8nkTJDH9KtL7+q9Sjd+WzFe47vM/jM8eojS1mEFVzIVkZmnT6eCyRiBQH16+Uxo3 Io4Nx0iYTtABjKQZ7ytcymgOXtjJ48/DXJ5X+OE+s5HUOscYh8SDTMC4QJW/6G4Tr8nX kDZuvn4cFcyrqshrJR2zttn8ZfkpgOk96+v7k8ZEPjdSQX+GvWCEmcTYh0qkQp9tmTF7 l58w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=N/CvSSexg2hjnvQvcETuWMDCFDqdmMisjVBlVLe0up8=; fh=sOw83M5m1tNITsJKompf9o62hvVDpUOPDyrvQX1i5Ng=; b=VHm4Kzg/Wt4M9hJMRWe4wGQXN6mOKP2aKkGuq5tpzHmN3NvO6STK2c+eKiWa8X8mj2 U6C6LGRRffEU6791ZuAIROeagGwyRxAaRb7cjXPzZsSNr/LrJA6gsPsVuyXn+43sAZxF n8OHpVh1GCSKuZi49oyBAccf1PUX38fcl794EAvf5+lnbGAQZLjF1tu9pZsJUsx/1umV IaUa5obCmJbbkaFL/IfCGGGw3mWEyxLwpSxhyVWC2nsRkjpmhWwIipvUtrwkzHh/CLXI WVzrkwc2WmvPSjtD04JlCRcG0+Y7goxQUQVu7P6uEQ5n9eQ5qygtY+mxDTVoO5fkmOqT pbNA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id ei48-20020a056a0080f000b006cb901a87c4si3069682pfb.376.2023.12.04.04.55.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 04:55:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 96679807C854; Mon, 4 Dec 2023 04:55:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344121AbjLDMyy (ORCPT + 99 others); Mon, 4 Dec 2023 07:54:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjLDMyx (ORCPT ); Mon, 4 Dec 2023 07:54:53 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 87663A8; Mon, 4 Dec 2023 04:54:59 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CAD8E1424; Mon, 4 Dec 2023 04:55:45 -0800 (PST) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 8F8DA3F5A1; Mon, 4 Dec 2023 04:54:54 -0800 (PST) Message-ID: <4c55f016-ae17-4ba1-aa39-3b96f11bdb5a@arm.com> Date: Mon, 4 Dec 2023 12:54:53 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 7/7] dma-mapping: Simplify arch_setup_dma_ops() Content-Language: en-GB To: Christoph Hellwig Cc: Joerg Roedel , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Huacai Chen , WANG Xuerui , Thomas Bogendoerfer , Paul Walmsley , Palmer Dabbelt , Albert Ou , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Suravee Suthikulpanit , David Woodhouse , Lu Baolu , Niklas Schnelle , Matthew Rosato , Gerald Schaefer , Jean-Philippe Brucker , Rob Herring , Frank Rowand , Marek Szyprowski , Jason Gunthorpe , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org References: <590a4a1b7d10fb9bb1c42ca6cd438e98e6cc94a7.1701268753.git.robin.murphy@arm.com> <20231204084440.GB919@lst.de> From: Robin Murphy In-Reply-To: <20231204084440.GB919@lst.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 04:55:09 -0800 (PST) On 04/12/2023 8:44 am, Christoph Hellwig wrote: > On Wed, Nov 29, 2023 at 05:43:04PM +0000, Robin Murphy wrote: >> The dma_base, size and iommu arguments are only used by ARM, and can >> now easily be deduced from the device itself, so there's no need to pass >> them through the callchain as well. > > This looks even better than the patch form Jason that only removed the > iommu argument: > > Reviewed-by: Christoph Hellwig > > I wonder if it makes sense to also remove the coherent argument > by setting up dev->dma_coherent in the caller. That would require > a pretty careful audit as we're doing a few weird things in that > area, though. Yeah, it crossed my mind too, but then I remembered we have at least the ARM stuff which may have already set a platform-specific value for dev->dma_coherent to take precedence over the firmware value, thus still needs to differentiate between the two at this point. Leaving the established argument in place seems neater IMO than having to go back to arch-specific mechanisms for that and any other similar tricks. Thanks, Robin.