Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp877783ybi; Fri, 31 May 2019 10:09:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyZQHrUcrjRu6mmu/3+tywTtM46lvAcyokq9yt0q/0VZmu3Pn7DEow/qRgxikhcZW2OqIkT X-Received: by 2002:a17:90a:9504:: with SMTP id t4mr10875095pjo.100.1559322583002; Fri, 31 May 2019 10:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559322582; cv=none; d=google.com; s=arc-20160816; b=vqb5d6KYcNgKA61HKp+d+tATMLPaUuAMXoU/BV0b0d7TYIbLeAP8nQuY4M0fr70TlV Qdp1NUKhOAtjVri/R4Jp2R1VpIJWSK/low62vTprHFyO7DCbcczy/hkxe5ARFyNYuNth Q2boETA07VlNxY5tCuIc9clNvkxFKMd9odu1TFGlVXMkWjM96kFo0+CjvJvVqYfdWu4+ EXnArJVukoLYFsl7/dnoI8UPb+WdsA/2IRImYg5mDGm2BZUtCTJF0sgTTA7jrjzgh8lg hW4+LDVHjT2vSv3gMDvLYIqMSMAOrwGddJyBmjAobLj5i6rsMGNBT6R5kiA46wlyUkCc XOlQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KA1uUOBpqKj4QS1sNKzCJjD8A4csLtN/AKjlhA9dyZ4=; b=LvgmA44KoShaOKRpj5Dl2sG87JQsvEAVGM1xz3B7RDAmhh9SlRM0xhRDBV3Y+vT+Ba 4zAWZYENHuwrjZGIXM7AZKgqOuo0kimC/xSvGiNGuMK2ffdoewuo5vafHMzqe4PADAfy hu3YyqE9tgeUX700WF3O2niSZM8T+IGz8xr5eV5LLORn+OhjOYJl9CeizrNY+BcKdvxk pLIXOWJmIG9bfQ8rvgwHHoJAJFnkKzO4c2Kbx+A59yHPOEl+PvIXm44HNl0xipGTAQk9 grbz2sVPRQaGmarMomWFiu2AZeV+fWiYSuNy8+60w8NZ+XUS3CND7fcheSiikBIhFAdJ WL+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J7gr7Qgf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k18si7587649pfd.233.2019.05.31.10.09.26; Fri, 31 May 2019 10:09:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J7gr7Qgf; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbfEaRIH (ORCPT + 99 others); Fri, 31 May 2019 13:08:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:42034 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726678AbfEaRIH (ORCPT ); Fri, 31 May 2019 13:08:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KA1uUOBpqKj4QS1sNKzCJjD8A4csLtN/AKjlhA9dyZ4=; b=J7gr7QgfnGMd3RiwgTEO8jP6E ULSkOOmwWFPFnywhLdh+p2cuOeX4AQEoiphY0Ag6Z2GAfHpY6TA1iZKHiMLzXZdNrNF55KwISgO+t RFh629prGuE2WWI7iD2GrUHNv1edocH8eoxgliHN4oJ6mxDAYpMs+zmfPL5ORoDje5kc1bi1D/+YN Mne6X1vfTWc3AJh8Q7Wx+odcNye3DVIiFbQY5V0qgHQosWq/OfCKBYdl7Ttg2jDF+/TqiL5zoLAkM 4G7bVYwc15Mku1cYtcDj5/cChhYPrOUHktIJnWGJKRYerrZV01vlPz0uNkBvJKhGYQ3oGAMmcvMe0 jS18hNg6Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1hWl0e-0003CU-6E; Fri, 31 May 2019 17:08:04 +0000 Date: Fri, 31 May 2019 10:08:04 -0700 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , David Miller , madalin.bucur@nxp.com, netdev@vger.kernel.org, roy.pledge@nxp.com, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, Joakim.Tjernlund@infinera.com, iommu@lists.linux-foundation.org, camelia.groza@nxp.com, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 0/6] Prerequisites for NXP LS104xA SMMU enablement Message-ID: <20190531170804.GA12211@infradead.org> References: <20190530141951.6704-1-laurentiu.tudor@nxp.com> <20190530.150844.1826796344374758568.davem@davemloft.net> <20190531163350.GB8708@infradead.org> <37406608-df48-c7a0-6975-4b4ad408ba36@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37406608-df48-c7a0-6975-4b4ad408ba36@arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 31, 2019 at 06:03:30PM +0100, Robin Murphy wrote: > > The thing needs to be completely redone as it abuses parts of the > > iommu API in a completely unacceptable way. > > `git grep iommu_iova_to_phys drivers/{crypto,gpu,net}` > > :( > > I guess one alternative is for the offending drivers to maintain their own > lookup tables of mapped DMA addresses - I think at least some of these > things allow storing some kind of token in a descriptor, which even if it's > not big enough for a virtual address might be sufficient for an index. Well, we'll at least need DMA API wrappers that work on the dma addr only and hide this madness underneath. And then tell if an given device supports this and fail the probe otherwise.