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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A9712C433EF for ; Thu, 7 Apr 2022 13:54:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tAjuTZkVWWn+N+oAm004vED9CL2Ne/V9CmFxbBNCgQY=; b=4g3D6mYGXbde/F iqrewWxT+ouf/l1dO/PW/fgo+kw32R7T4bUQz1vgK2J8/l8Hx5qXsxRMUfWl0kJVKGqLKsoz0qR1p qtTrceG/g+MbiQWNh3jVyX0OslUSsj4e5wEFONEcfSu53wS2v66P+GzmfoGgaqPqyjawZVQWxcQ95 nYFBQUkTl1o3aQ1fGY5uwx8A1Wz4WOyZlVjvT9iTQCYUlImVdz67M1d/Y7roceivgIZcfHZbpPyzY UW+8itiXXQUiExU+SaxC8K4xzpYbYj37HyXLXsDqpZVA06XjBI9sJ1h9e7QSAHKnmG+3ajfYssFcj 00wV/z/c5wjszTUeu4ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncSa8-00CEzM-QJ; Thu, 07 Apr 2022 13:53:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncSa1-00CExv-SK for linux-arm-kernel@lists.infradead.org; Thu, 07 Apr 2022 13:53:50 +0000 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 C0EF012FC; Thu, 7 Apr 2022 06:53:44 -0700 (PDT) Received: from [10.57.41.19] (unknown [10.57.41.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A90933F73B; Thu, 7 Apr 2022 06:53:42 -0700 (PDT) Message-ID: Date: Thu, 7 Apr 2022 14:53:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v9 06/11] ACPI/IORT: Add support to retrieve IORT RMR reserved regions Content-Language: en-GB To: Christoph Hellwig , Shameer Kolothum Cc: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, jon@solid-run.com, linuxarm@huawei.com, steven.price@arm.com, guohanjun@huawei.com, yangyicong@huawei.com, Sami.Mujawar@arm.com, will@kernel.org, wanghuiqiang@huawei.com References: <20220404124209.1086-1-shameerali.kolothum.thodi@huawei.com> <20220404124209.1086-7-shameerali.kolothum.thodi@huawei.com> From: Robin Murphy In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220407_065346_106811_8F6216D2 X-CRM114-Status: GOOD ( 10.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2022-04-07 14:28, Christoph Hellwig wrote: >> +static void iort_rmr_desc_check_overlap(struct acpi_iort_rmr_desc *desc, u32 count) > > Overly long line. > >> void iommu_dma_put_resv_regions(struct device *dev, struct list_head *list) >> { >> + if (!is_of_node(dev_iommu_fwspec_get(dev)->iommu_fwnode)) >> + iort_iommu_put_resv_regions(dev, list); >> + >> generic_iommu_put_resv_regions(dev, list); >> } > > Why can't this just go into generic_iommu_put_resv_regions? The idea > that the iommu low-level drivers need to call into dma-iommu which is > a consumer of the IOMMU API is odd. Especially if that just calls out > to ACPI code and generic IOMMU code only anyway. Because assuming ACPI means IORT is not generic. Part of the aim in adding the union to iommu_resv_region is that stuff like AMD's unity_map_entry and Intel's dmar_rmrr_unit can be folded into it as well, and their reserved region handling correspondingly simplified too. The iommu_dma_{get,put}_resv_region() helpers are kind of intended to be specific to the fwnode mechanism which deals with IORT and devicetree (once the reserved region bindings are fully worked out). Thanks, Robin. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel