Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp422312ybx; Fri, 1 Nov 2019 05:43:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqyC1RImFEhUAoOCDQ/3FmVcTY9t5FARGfozRP4CsTDp54nqpcjs+pL4YOMCarbF1gY14Etb X-Received: by 2002:a50:958d:: with SMTP id w13mr4254150eda.243.1572612197517; Fri, 01 Nov 2019 05:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572612197; cv=none; d=google.com; s=arc-20160816; b=sXzy511sZr69mWL8HNVYEc3KG9Plog3ohWGf3OVEwMcmxsnFQfOhGqD7UO5gauWUdD sFruK2wfa5MJ5LB6vwxL8KEAHy2mrocstSrpc2v/9Y4FZCpm0HGxzadazGNEdkEHIase mHSNUGvacjYjqd+91oGTyBiVUweK4XHtwHOp35IG0QoDDrRr539cjatpAguvJFbeGStt M5PRIaCXFEkP5Brl6uZPnDapy92rRnXtUOZMwifXlSiHejicc8uShGPJOFPMacTv8CKl AWCmXOfGTKlFF+//E7lZVoPw3POnaY8YSnUOOPsE1ExPs08XUX3VBC+wAt3z4MUilyXk AJbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=+NLf6LciSwlmFiNwY3mgdkYcjgserOlkKtKWPurnLCs=; b=Jg3rwOFJiYio1nV8lJXSWQiB+eTbzkjcmdGaDLMaofjy5VMqLYiRXxv8+bTc8mdjUC AfoUzqMInZO/fXgBzPjszKbKlAeyDR7fLA0B0ArHaNDh6RxjISPfe5STbLiS8PIVxBKk raIOSTx1oiXAIuMl8uGN72nyqhXvtA/IJ3T3bEgVy0+SWWfLh9FBCcgBQlqSVbtVqmbL V2Ih7DDA8Bk8VLnLoiVTwGdCHaFzZKDpKK01NPLnDMhDJFJJv1Sk61j5u5UPYyYaBnMl 4dgGsuRAA9/TB7/I41hSqxBU4ZUYCwmbcok2/6kol9KAC8GOTBTyBw6PvTuMfQSLZBa0 lmtg== 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 v20si243552edm.254.2019.11.01.05.42.54; Fri, 01 Nov 2019 05:43:17 -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 S1727600AbfKAM2c (ORCPT + 99 others); Fri, 1 Nov 2019 08:28:32 -0400 Received: from foss.arm.com ([217.140.110.172]:34588 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726889AbfKAM2b (ORCPT ); Fri, 1 Nov 2019 08:28:31 -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 27DFB1F1; Fri, 1 Nov 2019 05:28:31 -0700 (PDT) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 22B613F6C4; Fri, 1 Nov 2019 05:28:30 -0700 (PDT) Date: Fri, 1 Nov 2019 12:28:25 +0000 From: Lorenzo Pieralisi To: Jean-Philippe Brucker Cc: Saravana Kannan , Will Deacon , LKML , iommu@lists.linux-foundation.org, Bjorn Helgaas , Robin Murphy Subject: Re: [PATCH 0/7] iommu: Permit modular builds of ARM SMMU[v3] drivers Message-ID: <20191101122825.GA318@e121166-lin.cambridge.arm.com> References: <20191030145112.19738-1-will@kernel.org> <6e457227-ca06-2998-4ffa-a58ab171ce32@arm.com> <20191030155444.GC19096@willie-the-truck> <20191031193758.GA2607492@lophozonia> <20191101114148.GA2694906@lophozonia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191101114148.GA2694906@lophozonia> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 01, 2019 at 12:41:48PM +0100, Jean-Philippe Brucker wrote: [...] > > > I'm also wondering about ACPI support. > > > > I'd love to add ACPI support too, but I have zero knowledge of ACPI. > > I'd be happy to help anyone who wants to add ACPI support that allows > > ACPI to add device links. > > It's not as generic as device-tree, each vendor has their own table to > describe the IOMMU topology. I don't see a nice way to transpose the > add_links() callback there. Links need to be created either in a common > path (iommu_probe_device()) or in the APCI IORT driver. We can create a generic stub that calls into respective firmware handling paths (eg iort_dma_setup() in acpi_dma_configure()). There are three arches booting with ACPI so stubbing it out in specific firmware handlers is not such a big deal, less generic sure, but not catastrophically bad. Obviously this works for IOMMU masters links - for resources dependencies (eg power domains) it deserves some thought, keeping in mind that IOMMUs are static table entries in ACPI and not device objects so they are not even capable of expressing eg power resources and suchlike. Long story short: adding IOMMU masters links in ACPI should be reasonably simple, everything else requires further thought. Lorenzo