Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1034327pxv; Thu, 15 Jul 2021 23:29:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYV8gR3KHJXomUzQj6Tvqbh0Nz6eeqzU7FWGsp/cWg0ZR7kl1sr2mi5BKs0NaAMy/yPmaw X-Received: by 2002:aa7:c04e:: with SMTP id k14mr12181332edo.157.1626416953235; Thu, 15 Jul 2021 23:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626416953; cv=none; d=google.com; s=arc-20160816; b=YSx5glbR26C+fial3TQOF1yq6gbM3iAmr6ObPKtDts6xGCWW4ckcXO/UW24dqgGfvm XAMiVqVSu+nomnM3Wgm+fqLvGlw7C1xOZ5bwlgS2J1fs7PFd01m5strVnr/QvWcLaT3k yS2J4xdQIj1IOgZ2b3qzFEORv5uBv7KtClehVs1eONRXJ+Wm3dHBkp6F11tgn05okMWY CUxvrw2IWe3ZsEgdYuyfhNRgFfcPJN38nBlxLMDRBxltQ8LajguMGrGY7aySUSyhNL4M abW4YYlF+h//DCIkVFQ8cmWcjLKkGOdl9VSYyHSdu5MWBX/mZWbs3nRSzWRseSqs5rN9 lSYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nUjvHWwQzpb8v3JLLhXC0gHnxeaBdGyJCLTEJYo+tDU=; b=0oXkhZFyxZx8fLT6iVgs0cUG9JniTbxH+Esy0f2UjqqXsGLiO5ZKx80q9qXPhXSaWv shSEb12iuSWhvYHarUYvCzWEZXsKMnU8XPjjoz3fC5QN+JNuC/CcEzOtuZeJkPinMmIU IyyIjZCDwrvrXDEOaPNte9HtaDP9SHitfrWalmcvU0TkfUtryjDrDnsIlGgWhvdxODBL E7hdJMVkZPv5lNZtQTWmK6sMD/73m/Ek+z/TVWcYYg5mckkZdkmLZRQv+kZzbewmL2GV 9ZGcw01lqw/oedSjvsDrlWk2Hd9X0pydq2X+NUAQ7Qm4HYpmYWCrfsEFonhmfSg37bXr YSfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=huSKh0ok; 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 i18si8256705edr.353.2021.07.15.23.28.49; Thu, 15 Jul 2021 23:29:13 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=huSKh0ok; 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 S234815AbhGPG2p (ORCPT + 99 others); Fri, 16 Jul 2021 02:28:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231778AbhGPG2p (ORCPT ); Fri, 16 Jul 2021 02:28:45 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34D6FC06175F; Thu, 15 Jul 2021 23:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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; bh=nUjvHWwQzpb8v3JLLhXC0gHnxeaBdGyJCLTEJYo+tDU=; b=huSKh0okN6XoYJ0y+dNAPgyNBm F7FXsLDRcvDHuySrVPIHVbyStwyItZ/mdSW3L/fqeJJ47c6kBdo/N6Poo2g0iLZB8JaYtHz8Pz2FR aF0dgTJomsYvCIKwL6zIjvxUHCQZVJ8bhRZeAG44PSQ4CKcVEXxGf6aM4lt8rptgyJLFsw3ryiGSE 231k4bokw+Cu6nOyqGfOabFJNNlO6dr/gzmeQIwo5Yqcsx4WM/Nj2H1DHuNNlJVHayhmrjC+8KUyb dstirsS0SKabaihWxuTE6mv8KdQ0UMLkuM7hdYgi4xIsWblap+VguVBQB6wwRahw5mGKn3GUSlZeH 07nz0j9w==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1m4HGV-004DCm-CL; Fri, 16 Jul 2021 06:24:28 +0000 Date: Fri, 16 Jul 2021 07:24:03 +0100 From: Christoph Hellwig To: Robin Murphy 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 Subject: Re: [PATCH v4 0/3] Apple M1 DART IOMMU driver Message-ID: References: <20210627143405.77298-1-sven@svenpeter.dev> <7261df01-34a9-4e53-37cd-ae1aa15b1fb4@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7261df01-34a9-4e53-37cd-ae1aa15b1fb4@arm.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Drivers need to call dma_get_merge_boundary() to check for that kind of behavior.