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 X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B572C04AB6 for ; Fri, 31 May 2019 17:03:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D338A26CB9 for ; Fri, 31 May 2019 17:03:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726957AbfEaRDh (ORCPT ); Fri, 31 May 2019 13:03:37 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:54924 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726531AbfEaRDh (ORCPT ); Fri, 31 May 2019 13:03:37 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 00600A78; Fri, 31 May 2019 10:03:37 -0700 (PDT) Received: from [10.1.196.75] (e110467-lin.cambridge.arm.com [10.1.196.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7B94C3F59C; Fri, 31 May 2019 10:03:32 -0700 (PDT) Subject: Re: [PATCH v3 0/6] Prerequisites for NXP LS104xA SMMU enablement To: Christoph Hellwig , David Miller Cc: 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 References: <20190530141951.6704-1-laurentiu.tudor@nxp.com> <20190530.150844.1826796344374758568.davem@davemloft.net> <20190531163350.GB8708@infradead.org> From: Robin Murphy Message-ID: <37406608-df48-c7a0-6975-4b4ad408ba36@arm.com> Date: Fri, 31 May 2019 18:03:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190531163350.GB8708@infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/05/2019 17:33, Christoph Hellwig wrote: > On Thu, May 30, 2019 at 03:08:44PM -0700, David Miller wrote: >> From: laurentiu.tudor@nxp.com >> Date: Thu, 30 May 2019 17:19:45 +0300 >> >>> Depends on this pull request: >>> >>> http://lists.infradead.org/pipermail/linux-arm-kernel/2019-May/653554.html >> >> I'm not sure how you want me to handle this. > > 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. Robin.