Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3192104yba; Tue, 16 Apr 2019 06:38:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxOQRKGoZvG6zR7sylxKBx7uCaJX4kbM8CmqOM5aj7AsQlEfOFASINzyzgPVJLti3M1Ckp7 X-Received: by 2002:a17:902:9686:: with SMTP id n6mr39441463plp.282.1555421924778; Tue, 16 Apr 2019 06:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555421924; cv=none; d=google.com; s=arc-20160816; b=wtsYE4TEN2tdkSgQbp1xSMbdxgcZ7DLxTaIQdwqVme4SCo5tl7k+JQizniOhu9t3Y+ 4UHDqnI1Eocp9AVJrXgfCiZAVdFy0EcUtbQ6W9Ylu1W8WS9RXjecyvxXEX3v5BfSZe88 CmA4TSJ5FeZw1k+ZE3ER030WrqI91SQ8VBdmsLcMRia6PsB8pMFcVcpVULubiTsKC2SR Jrye9FpjGriHvdYjWanXWlfc5i1JahmFso+LsMCrqcg0aPVk4gjLXdhZUzfmxO2ZYuq5 ExiG7nyKsLWF2N2+h1X1Ur+qT/ZqekkarjZW+qubMxO/aeG4knDNaWIbmLxEUX0uRMpY zmpw== 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=CM6hUNRUhVZt0YEd2Nod1CiYM0nTmZ0BJtqaLDg7IvE=; b=Dg7EEzq9Cwz/Hg33vJXy1hxKlmuEKkH3Ijj3r4ioVw17cnt5UE10qGowv96KDYPEFw z5VR0X/3S7nnNpWRUnhzlVKaNm39YGCS1a7wcalt/waxCBo6Jp35dHgSNd946nEMrAu2 w1hQ6w0XaTy+zYNM9KSXa8MPTVTFt2SxkNUyphUnB5HQJzv3rk17D0AyEtCUZIUW35nZ jLtNP7YXJs89sOP+L33QW4BwdbvHSSsLJlJy8btLBHb9wCK1qlay9/MlODG2bvj7vcm0 /gW71dtOSoSL/dJQdZhcTPxGkOHRtUTNQ22OciUD8W6WXQmchks7bvP0sFFde3V7FYLb wJPQ== 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 141si47035287pgb.178.2019.04.16.06.38.28; Tue, 16 Apr 2019 06:38:44 -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 S1729374AbfDPNhp (ORCPT + 99 others); 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..