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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69CD2C433F5 for ; Mon, 11 Oct 2021 15:00:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B7F560EE2 for ; Mon, 11 Oct 2021 15:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236927AbhJKPC5 (ORCPT ); Mon, 11 Oct 2021 11:02:57 -0400 Received: from foss.arm.com ([217.140.110.172]:60808 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231356AbhJKPC5 (ORCPT ); Mon, 11 Oct 2021 11:02:57 -0400 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 0EB10101E; Mon, 11 Oct 2021 08:00:57 -0700 (PDT) Received: from [10.57.95.157] (unknown [10.57.95.157]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D1E353F694; Mon, 11 Oct 2021 08:00:54 -0700 (PDT) Subject: Re: [PATCH v7 9/9] iommu/dma: Reserve any RMR regions associated with a dev To: Jon Nettleton Cc: Shameer Kolothum , linux-arm-kernel , ACPI Devel Maling List , Linux IOMMU , Linuxarm , Lorenzo Pieralisi , Joerg Roedel , Will Deacon , wanghuiqiang , Hanjun Guo , Steven Price , Sami Mujawar , Eric Auger , yangyicong References: <20210805080724.480-1-shameerali.kolothum.thodi@huawei.com> <20210805080724.480-10-shameerali.kolothum.thodi@huawei.com> <44e00e32-be89-1174-beb5-9a2fca85a683@arm.com> From: Robin Murphy Message-ID: <706e2dc8-37af-2344-0d99-6da1f27ba0fb@arm.com> Date: Mon, 11 Oct 2021 16:00:48 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On 2021-10-09 08:07, Jon Nettleton wrote: > On Fri, Oct 8, 2021 at 3:10 PM Robin Murphy wrote: >> >> On 2021-08-05 09:07, Shameer Kolothum wrote: >>> Get ACPI IORT RMR regions associated with a dev reserved >>> so that there is a unity mapping for them in SMMU. >> >> This feels like most of it belongs in the IORT code rather than >> iommu-dma (which should save the temporary list copy as well). > > See previous comment. The original intent was for device-tree to also > be able to use these mechanisms to create RMR's and support them > in the SMMU. Can you clarify how code behind an "if (!is_of_node(...))" check alongside other IORT-specific code is expected to be useful for DT? Yes, iommu_dma_get_resv_regions() itself wants to end up serving as an abstraction layer, but that still doesn't mean it has to do much more than dispatch into firmware-specific backends as appropriate. Robin.