Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1402559pxv; Fri, 16 Jul 2021 08:35:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzKv1OHPY0TJynRQOg9fqnjlqZkyuADdjV4JcmJkHqVdHEZZO9MvXpQqxKZYGsR30Ap8taT X-Received: by 2002:a5d:9d07:: with SMTP id j7mr7725135ioj.33.1626449753440; Fri, 16 Jul 2021 08:35:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626449753; cv=none; d=google.com; s=arc-20160816; b=X9MZaZhAQhXbMn90VSjh+4ReRkkD4WstVOHygzSt0EwMtd7UqnhZL6Z7+i+ioHe2R5 i2PfM7aTCsBmqtxxPGIlMd9vOR4+hxZLVBX7TG5Rt3Fxg/RSQvZNa1RX+iNAnymtI8dA esmJNkVtv2HCFEKPWWtUD9nzrld7MrMr475gnUF/WnsO0iEfZhiuWynCxAk1w1pZsLb0 CcCYBZPlXJ9Ob4qnQvOnKNY2IGk2V1QzdR+TYkh2dZ//hytrbfGGZqbhv3FlfaA2Gv+x OlFCELrIa1FxOxjY3dZ8CnG9FX9cjM5kt/qSGmu/XPRMvWFgokrKuqnzWPdA71uygdYb 0mtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=FJjUqBRI06eMhdgh/w5yNA7y8+mUp8y0yqYfjWFJPM0=; b=Allf0i6sO/CI2gOTwscU3mo2VlYEgyiSfwhxP9bTq/QBPIiTwED8eZP32frSrGTBsZ z81dhqFgkcqqO+RoMDrUO9iJGEYwktUgPQu2TqkUIIHzUB5KGU+HB/wlY3OHYKYX4TvC 5dZU2gCF6YJgEl/qw+shAkYbJTStgmwt9J/rE9jm6rHHkJHnbcPdIyWtzPv0L5drJZ3W R4sNjSrmF5REDUdAVWuPlwaUyVjk1W1t6M0l0E6yIv0jMHMRkTYueJBiG0VDF952oVvq M7Iv3wP91fcq5D7QvrUejVUgRRdt39KQU6k5qa/r8f3Okcm5EvDHQlXSO6/Pfwrf4fpq 7cdQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s13si10523477ilp.102.2021.07.16.08.35.40; Fri, 16 Jul 2021 08:35:53 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240282AbhGPPf7 (ORCPT + 99 others); Fri, 16 Jul 2021 11:35:59 -0400 Received: from foss.arm.com ([217.140.110.172]:40190 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240845AbhGPPfz (ORCPT ); Fri, 16 Jul 2021 11:35:55 -0400 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 74B81D6E; Fri, 16 Jul 2021 08:32:59 -0700 (PDT) Received: from [10.57.36.240] (unknown [10.57.36.240]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A607E3F774; Fri, 16 Jul 2021 08:32:56 -0700 (PDT) Subject: Re: [PATCH v4 0/3] Apple M1 DART IOMMU driver To: Christoph Hellwig Cc: Sven Peter , Will Deacon , Joerg Roedel , Arnd Bergmann , devicetree@vger.kernel.org, Hector Martin , linux-kernel@vger.kernel.org, Marc Zyngier , Mohamed Mediouni , Stan Skowronek , linux-arm-kernel@lists.infradead.org, Mark Kettenis , iommu@lists.linux-foundation.org, Alexander Graf , Alyssa Rosenzweig , Rob Herring , r.czerwinski@pengutronix.de, Mauro Carvalho Chehab , linux-media@vger.kernel.org References: <20210627143405.77298-1-sven@svenpeter.dev> <7261df01-34a9-4e53-37cd-ae1aa15b1fb4@arm.com> From: Robin Murphy Message-ID: <0d20bd6b-d0a1-019c-6398-b12f83f4fdf7@arm.com> Date: Fri, 16 Jul 2021 16:32:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-07-16 07:24, Christoph Hellwig wrote: > On Wed, Jul 14, 2021 at 07:19:50PM +0100, Robin Murphy wrote: >> Even at the DMA API level you could hide *some* of it (at the cost of >> effectively only having 1/4 of the usable address space), but there are >> still cases like where v4l2 has a hard requirement that a page-aligned >> scatterlist can be mapped into a contiguous region of DMA addresses. > > Where does v4l2 make that broken assumption? Plenty of dma mapping > implementations including dma-direct do not support that. See vb2_dc_get_contiguous_size() and its callers. I still remember spending an entire work day on writing one email at the culmination of this discussion: https://lore.kernel.org/linux-iommu/56409B6D.5090903@arm.com/ 809eac54cdd6 was framed as an efficiency improvement because it technically was one (and something I had wanted to implement anyway), but it was also very much to save myself from any further email debates or customer calls about "regressing" code ported from 32-bit platforms... Robin.