Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3761651yba; Mon, 29 Apr 2019 08:07:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFW/35De2aSekS7yDn5BNeiOIJAO3bHkwp/qQQZ9Rr/Uo1moJEzateUcOsbVix9xFr0NaG X-Received: by 2002:a65:44c6:: with SMTP id g6mr58279109pgs.157.1556550425953; Mon, 29 Apr 2019 08:07:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556550425; cv=none; d=google.com; s=arc-20160816; b=wP9he0aMJ5prO9iaptP618wY3IypqvkV7cmd7UMuRyw0O0V/1Z2SneLGjnSy+9I7un CJ9SzNFAzEEsQH1jHk1KSAerVk5W6R5RQW716A5gWZi3QptCHKMdAwVPVuI2F1NAEeNR V7LQvgQgRFLgx5TqHAEmvMCnH4f10T3YzZnVgFiEoLiVCgDGyYhRNcgJ0d4lT+QaSs6w Wo81B2PT2rrb5wNxP/xq1aIzUZdFJXIg7rOPP4j3VcFbe6o0oKTCw6KRCSe8yrc7ktR9 OZByUkUD0ATKrAsVVkx42teWpxfjW4p6VNrEcSKmDnq3R07aXBswUiWUba1ZhtWLTQ4V bmnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=f5d5vevKrUExg/gNDALwtW126u+/S1xXzw0SjGfgd3w=; b=EUAteo4IXeWh2eRKeNiIyvizWbwpb/VpMCrGuk5bbmvi1QQUXiwILejSvh9FElJyOm uK9k2rldIMUWte2txmYORqairQwfCMjIdyjNjTC4ZITwDvGMKMSiHgxMjsiN0xWkMAM2 /QSVTMdaSRhIam6KE67mg7Rfm7qZtbwH5VVWPZsWxEg+jAnOXR2oN3WAk2oJKXXQ+fYX hN0fS+jt84cWSOvjM+646ufCN+Q4A47olrsIIfwRhFWM8WkvGeAy9Jf3hluIFiS2O6cp V+quTnARf3/8mI/q1Hr+M05+ceQvIjSjCcKBhLkhnKuMouX/NSktGTTew/KE5rR3B6Uu apsQ== ARC-Authentication-Results: i=1; mx.google.com; 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 k12si30322793pgo.429.2019.04.29.08.06.45; Mon, 29 Apr 2019 08:07:05 -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; 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 S1728510AbfD2PDd (ORCPT + 99 others); Mon, 29 Apr 2019 11:03:33 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:59740 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728339AbfD2PDd (ORCPT ); Mon, 29 Apr 2019 11:03:33 -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 D0FAF80D; Mon, 29 Apr 2019 08:03:32 -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 689D63F5C1; Mon, 29 Apr 2019 08:03:31 -0700 (PDT) Subject: Re: implement generic dma_map_ops for IOMMUs v3 To: Christoph Hellwig , Catalin Marinas , Will Deacon Cc: Joerg Roedel , Tom Lendacky , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20190422175942.18788-1-hch@lst.de> From: Robin Murphy Message-ID: <9ae8ce99-65a8-711d-b17d-165df7e280d4@arm.com> Date: Mon, 29 Apr 2019 16:03:29 +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: <20190422175942.18788-1-hch@lst.de> 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 22/04/2019 18:59, Christoph Hellwig wrote: > Hi Robin, > > please take a look at this series, which implements a completely generic > set of dma_map_ops for IOMMU drivers. This is done by taking the > existing arm64 code, moving it to drivers/iommu and then massaging it > so that it can also work for architectures with DMA remapping. This > should help future ports to support IOMMUs more easily, and also allow > to remove various custom IOMMU dma_map_ops implementations, like Tom > was planning to for the AMD one. Modulo a few nits, I think this looks pretty much good to go, and it would certainly be good to get as much as reasonable queued soon for the sake of progress elsewhere. Catalin, Will, I think the arm64 parts are all OK but please take a look to confirm. Thanks, Robin. > > A git tree is also available at: > > git://git.infradead.org/users/hch/misc.git dma-iommu-ops.3 > > Gitweb: > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/dma-iommu-ops.3 > > Changes since v2: > - address various review comments and include patches from Robin > > Changes since v1: > - only include other headers in dma-iommu.h if CONFIG_DMA_IOMMU is enabled > - keep using a scatterlist in iommu_dma_alloc > - split out mmap/sgtable fixes and move them early in the series > - updated a few commit logs >