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_PASS,URIBL_BLOCKED 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 B3A06C10F13 for ; Tue, 16 Apr 2019 13:37:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E28F217F9 for ; Tue, 16 Apr 2019 13:37:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729390AbfDPNhp (ORCPT ); Tue, 16 Apr 2019 09:37:45 -0400 Received: from foss.arm.com ([217.140.101.70]:55122 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728032AbfDPNho (ORCPT ); Tue, 16 Apr 2019 09:37:44 -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 CBD86EBD; Tue, 16 Apr 2019 06:37:43 -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 B21A73F59C; Tue, 16 Apr 2019 06:37:40 -0700 (PDT) Subject: Re: [PATCH 3/9] iommu/dma-iommu: Add iommu_dma_copy_reserved_iova, iommu_dma_apply_resv_region to the dma-iommu api To: Tom Murphy , Christoph Hellwig Cc: iommu@lists.linux-foundation.org, Heiko Stuebner , Will Deacon , David Brown , linux-samsung-soc@vger.kernel.org, Dmitry Safonov , Krzysztof Kozlowski , linux-rockchip@lists.infradead.org, Kukjin Kim , Andy Gross , Marc Zyngier , linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, Matthias Brugger , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Tom Murphy References: <20190411184741.27540-1-tmurphy@arista.com> <20190411184741.27540-4-tmurphy@arista.com> <20190415063134.GB1377@infradead.org> From: Robin Murphy Message-ID: Date: Tue, 16 Apr 2019 14:37:39 +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: 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 16/04/2019 14:22, Tom Murphy wrote: > I hoped this could be an exception, it's easier to grok without the > line break and isn't crazy long. Because you mentioned it I'll fix it. Frankly this patch is hard to justify anyway - iommu-dma already has its own reserved region handling, and there should be no need for external callers to be poking into the innards provided the IOMMU driver reports the correct reserved regions in the first place. If the iommu-dma abstraction is not quite sufficient to actually convert amd-iommu to use it properly, then we should improve the abstraction, rather than just punching holes in it to merely poke renamed parts of the existing amd-iommu logic into. Robin. > On Mon, Apr 15, 2019 at 7:31 AM Christoph Hellwig wrote: >> >> On Thu, Apr 11, 2019 at 07:47:32PM +0100, Tom Murphy via iommu wrote: >>> + >>> + WARN_ON_ONCE(iommu_dma_reserve_iova(domain, region->start, end) == NULL); >> >> Overly long line..