Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4868548ybv; Mon, 17 Feb 2020 07:27:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxEssDkNHETaMup4N4vPltYVUCXc3J8XF2mVxKsWjK3v1jIjDO5Q7cdP14JEB3KIb3xR7MG X-Received: by 2002:a9d:3f4b:: with SMTP id m69mr11619631otc.146.1581953261135; Mon, 17 Feb 2020 07:27:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581953261; cv=none; d=google.com; s=arc-20160816; b=ZQ9Kjsv/DdVAmxDNAa6VAomA+jXEgeJcwX1uovRe79F1B70Jf+/8ucPLip2qeJB2lL XKb/wxtt2g9VttNdIz9/Ih9TmS0QCuJlsWxUY3hnL5PAb5vWqTdCs1PgIisbJFWdYVWH +mnl9PxYLRBZLCRWaz46sypmoCZMz59a2yv/f9TEL0MhIMiFj23RByflNuFSYxqkLNPd 7us6Rf1WUIfOvTDf7dEp54PKCYRjWjHuHVRwGJNDbIaZEgSaoSfVPtWyoAo9CuCZKZjl MT7M7NlLfrJ7Edri47VAPOdD3PwI/uPwb1X7hh/D0kIY7SkmP8SkF8NTZ671obOvMkhs O1Mg== 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=Iq7yuvbS0P3I4DD/qevrOS8XWxQQQ829QHAgqQBQm9w=; b=U1jc7HgEN4WqgOWNZSdkzzyqdwau5cNC+/6oAFF4qI6STk03j65sLA+c5wQj9qiY2p dY4KkU8WnJFcyxFFntpL2zmcxaLoWlgow4Dc82vD4U6r5+i7+4lnScvDvz/WRJPzS5wt iTeJKlgTQXKJcxaywHvg/p/ZxOwWcri9/dG/2rwx4w7aRa5nC3UwRWX1zG0/NJTmmBXD TeB1a9tc1RpNmE4T1tziqSkd5FrxygU0jwe5LWu3mJtuJtTWfyvFJaSDbUz62bWdwr5u CktO0yJDRuh+V7T/8ylxO86ZTPtm3fzEnD12GCTjlvp8HEApCk12G2N2E3C76c7Izg+I STCg== 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 r4si316091otq.188.2020.02.17.07.27.28; Mon, 17 Feb 2020 07:27:41 -0800 (PST) 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 S1728981AbgBQPZ2 (ORCPT + 99 others); Mon, 17 Feb 2020 10:25:28 -0500 Received: from foss.arm.com ([217.140.110.172]:37308 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727553AbgBQPZ2 (ORCPT ); Mon, 17 Feb 2020 10:25:28 -0500 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 8B69030E; Mon, 17 Feb 2020 07:25:27 -0800 (PST) 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 41D553F703; Mon, 17 Feb 2020 07:25:24 -0800 (PST) Date: Mon, 17 Feb 2020 15:25:18 +0000 From: Lorenzo Pieralisi To: Pankaj Bansal Cc: Marc Zyngier , Ard Biesheuvel , Makarand Pawagi , Calvin Johnson , "stuyoder@gmail.com" , "nleeder@codeaurora.org" , Ioana Ciornei , Cristi Sovaiala , Hanjun Guo , Will Deacon , "jon@solid-run.com" , Russell King , ACPI Devel Maling List , Len Brown , Jason Cooper , Andy Wang , Varun Sethi , Thomas Gleixner , linux-arm-kernel , Laurentiu Tudor , Paul Yang , "netdev@vger.kernel.org" , "Rafael J. Wysocki" , Linux Kernel Mailing List , Shameerali Kolothum Thodi , Sudeep Holla , Robin Murphy Subject: Re: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc Message-ID: <20200217152518.GA18376@e121166-lin.cambridge.arm.com> References: <12531d6c569c7e14dffe8e288d9f4a0b@kernel.org> <7349fa0e6d62a3e0d0e540f2e17646e0@kernel.org> <20200214161957.GA27513@e121166-lin.cambridge.arm.com> <20200214174949.GA30484@e121166-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Mon, Feb 17, 2020 at 12:35:12PM +0000, Pankaj Bansal wrote: > > > > -----Original Message----- > > From: Lorenzo Pieralisi > > Sent: Friday, February 14, 2020 11:20 PM > > To: Pankaj Bansal > > Cc: Marc Zyngier ; Ard Biesheuvel > > ; Makarand Pawagi ; > > Calvin Johnson ; stuyoder@gmail.com; > > nleeder@codeaurora.org; Ioana Ciornei ; Cristi > > Sovaiala ; Hanjun Guo ; > > Will Deacon ; jon@solid-run.com; Russell King > > ; ACPI Devel Maling List ; > > Len Brown ; Jason Cooper ; Andy > > Wang ; Varun Sethi ; Thomas > > Gleixner ; linux-arm-kernel > kernel@lists.infradead.org>; Laurentiu Tudor ; Paul > > Yang ; netdev@vger.kernel.org; Rafael J. Wysocki > > ; Linux Kernel Mailing List ; > > Shameerali Kolothum Thodi ; > > Sudeep Holla ; Robin Murphy > > > > Subject: Re: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc > > > > On Fri, Feb 14, 2020 at 04:35:10PM +0000, Pankaj Bansal wrote: > > > > [...] > > > > > > -----Original Message----- > > > > From: Lorenzo Pieralisi > > > > Sent: Friday, February 14, 2020 9:50 PM > > > > To: Pankaj Bansal > > > > Cc: Marc Zyngier ; Ard Biesheuvel > > > > ; Makarand Pawagi > > ; > > > > Calvin Johnson ; stuyoder@gmail.com; > > > > nleeder@codeaurora.org; Ioana Ciornei ; Cristi > > > > Sovaiala ; Hanjun Guo > > ; > > > > Will Deacon ; jon@solid-run.com; Russell King > > > > ; ACPI Devel Maling List > acpi@vger.kernel.org>; > > > > Len Brown ; Jason Cooper ; > > Andy > > > > Wang ; Varun Sethi ; Thomas > > > > Gleixner ; linux-arm-kernel > > > kernel@lists.infradead.org>; Laurentiu Tudor ; > > Paul > > > > Yang ; netdev@vger.kernel.org; Rafael J. Wysocki > > > > ; Linux Kernel Mailing List > kernel@vger.kernel.org>; > > > > Shameerali Kolothum Thodi ; > > > > Sudeep Holla ; Robin Murphy > > > > > > > > Subject: Re: [EXT] Re: [PATCH] bus: fsl-mc: Add ACPI support for fsl-mc > > Side note: would you mind removing the email headers (as above) in your > > replies please ? Read the question above please. [...] > > > As stated above, in Linux MC is a bus (just like PCI bus, AMBA bus etc) > > > There can be multiple devices attached to this bus. Moreover, we can > > dynamically create/destroy these devices. > > > Now, we want to represent this BUS (not individual devices connected to bus) > > in IORT table. > > > The only possible way right now we see is that we describe it as Named > > components having a pool of ID mappings. > > > As and when devices are created and attached to bus, we sift through this pool > > to correctly determine the output ID for the device. > > > Now the input ID that we provide, can come from device itself. > > > Then we can use the Platform MSI framework for MC bus devices. > > > > So are you asking me if that's OK ? Or there is something you can't > > describe with IORT ? > > I am asking if that would be acceptable? > i.e. we represent MC bus as Named component is IORT table with a pool of IDs (without single ID mapping flag) > and then we use the Platform MSI framework for all children devices of MC bus. > Note that it would require the Platform MSI layer to correctly pass an input id for a platform device to IORT layer. How is this solved in DT ? You don't seem to need any DT binding on top of the msi-parent property, which is equivalent to IORT single mappings AFAICS so I would like to understand the whole DT flow (so that I understand how this FSL bus works) before commenting any further. > And IORT layer ought to retrieve the output id based on single ID mapping flag as well as input id. > > > > > Side note: can you explain to me please how the MSI allocation flow > > and kernel data structures/drivers are modeled in DT ? I had a quick > > look at: > > > > drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c > > > > and to start with, does that code imply that we create a > > DOMAIN_BUS_FSL_MC_MSI on ALL DT systems with an ITS device node ? > > Yes. It's being done for all DT systems having ITS node. This does not seem correct to me, I will let Marc comment on the matter. > The domain creation is handled in drivers/bus/fsl-mc/fsl-mc-msi.c Thanks, Lorenzo