Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp71486pxk; Fri, 11 Sep 2020 00:10:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkVrBgOWolYWfO0VK9Ldnph5fUFIhz2ykmr3Nik11pAGy0NcGQz+uxl+AYiwb3BuQu9wZv X-Received: by 2002:a17:906:b1d7:: with SMTP id bv23mr683458ejb.464.1599808254544; Fri, 11 Sep 2020 00:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599808254; cv=none; d=google.com; s=arc-20160816; b=AHVdEUIhU8rcukmiYZJvbL/Y4VHjjVGiPyggnRPZXMO59WWCSHZo6YXLkcg7YOL0aY Fx99NmWlQ0R85Xv55imkAMG2xOnkiPUQAOYkS9tSOADQ/EqJiXiQVvYGUxg8Re83Co/F jEpSI5ngVhUde9kuMKSU75LpjOY4Aq+8JMfnvTa93wmcWHCkzmIvsIeousHGbXW7zYFh 0VmarQsfQew1K284os95rBE6LE9nVMb7LJZuWLyOVfqkQuLtqDilckzK85oZPyzSdHdS VE56oIKJBnWqiw0Rhkyanrrgtrdm21+kw/oqfIUdDunH5tXZstn4vUr/xWnhNbimjLYq qW7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Q+IN431BA7O+F1vNGjU4eO67bk44uQQqqmNoDYWMRks=; b=yyt7pAe06Y7yYlirgLL6tPXCvg3jTYpR2Eg9nLnjwUhbLInGQDL+XJJ+DLIDzdI6wG Fi7cm+o69+7yid87csLz5SQXi7IfElS8Cu1h3C8M3kJDrRBIf79tRfX96WRzlUtXc84w zkOv0G54+o2Q1oqNO0rtNZvFwNldyIiwv9mCLAweKeUZClfxThEOyzbPwcu1lKDrh0yY yGYlDGRr+QJA3033xp6gNsOafm3GHrI3RmlUblVrMxAusKw7q/0xlVfxA0E/Sn6/qAMU yBL+RFnXBgmeby1me+T1ZxCM0jf68qiIfHeHfhMuBw6NZNXFSeZw8y1k+KhnjtyYwbZ8 Rkfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si714967edc.112.2020.09.11.00.10.31; Fri, 11 Sep 2020 00:10:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725783AbgIKHJz (ORCPT + 99 others); Fri, 11 Sep 2020 03:09:55 -0400 Received: from verein.lst.de ([213.95.11.211]:35756 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgIKHJy (ORCPT ); Fri, 11 Sep 2020 03:09:54 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id DFED868B02; Fri, 11 Sep 2020 09:09:50 +0200 (CEST) Date: Fri, 11 Sep 2020 09:09:50 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Tony Luck , Fenghua Yu , Thomas Bogendoerfer , iommu@lists.linux-foundation.org, Tomasz Figa , Joerg Roedel , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org Subject: Re: [PATCH 04/12] dma-mapping: fix DMA_OPS dependencies Message-ID: <20200911070950.GB22394@lst.de> References: <20200908164758.3177341-1-hch@lst.de> <20200908164758.3177341-5-hch@lst.de> <1e3c7094-62da-6e8c-0a41-0bc63dd3db68@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1e3c7094-62da-6e8c-0a41-0bc63dd3db68@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 01:55:37PM +0100, Robin Murphy wrote: > AFAICS all three of these bus drivers are only proxying a struct > dma_map_ops * pointer around, so if they used the set_dma_ops() helper they > shouldn't even need these selects at all. Only INTEL_MIC_HOST appears to > have a logical dependency on DMA_OPS for actual functionality. > > However, I have a vague feeling you might not be fond of those dma_ops > helpers, and I have no great objection to this one-liner as-is, so (modulo > the couple of commit message typos), The problem with these inherÑ–tances is that they don't actually work for the general case. You'd also need to inherity things like the dma ranges, the bus limits, etc, etc. So we need to kill them instead. That whole mic/vop case is even worse than that with it's weird set of chained dma ops that seems to implement some kind of device side iommu that isn't in scope for the DMA API at all.