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 D5628C54EE9 for ; Thu, 8 Sep 2022 14:31:09 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Zn+O9sewhBXqMwzfzPBkmNj12ld+u8GjD1TCBVBfjlI=; b=DspsVXaGeJ1JuD ojFfuqD6XpkS5xZKL5/8ShJ3old5NOgwB7HgnyZekFxkNNUAtxrhTqg3/cQDjbVNofJZxeG/QbSol 5kKVWuZHH1GwrxEmC+CfurcY0vowPasmZ7woY8wFwvoH+Vqp/AO22ASDBrCmefsj1baoBtmmqWoFe AFbK0/2KSuT9zRe1y6o37FXQShgpK2T4wVGsBk1GOXKU3So6kRxgzrfjnmC+dSL0ZeUATlnDq5oiN fBFOvXIMZPN75SGtZF/hzhppVddRYsHrIPl2l13AQx/iM+T0VKdYU7lP9Cx+xNc3MufrCS84tBPSp Il/vRZO3EPEsdbwqSFJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIXT-004gy9-Ke; Thu, 08 Sep 2022 14:29:56 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oWIXM-004gue-NQ for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2022 14:29:50 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2509561D34; Thu, 8 Sep 2022 14:29:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC3A2C433D6; Thu, 8 Sep 2022 14:29:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662647387; bh=AbVZqHJl+7SxVST4pg5pkPSRUHLYewfXvl1HBbUGqlc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qQVJx0XfJyJH18/Ohw6rUELCQSPg3Iuuq6RH1+76cRXk6T0242fJFYRy3Pm9MqpV3 TSP38zZmkvOQNlHl7Y899056a5UU+fQWBd7aAp9jZQURSD1Oj/F9UG9XV+0MfbC0PH oWO1ONuyDeE98sPsRhrQKHW8HoNcM9JFeKzYhOCGTgNY5vC3nylrlOAcr0noMCv8rq 6lvipTHgLw/j2jvkGu3PjXkAeMxz+lx6GzEjSX+G1vMuJmxN9PqQHl5TiCcBWCVWb1 oMWqmfasoLoVdKPBNY0fRVctR+gh+jeG2z95V++QO2eEmudPg7eFql0oIHUESo0qVf p4f7wyp+2iJ2w== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oWIXJ-008wPY-6m; Thu, 08 Sep 2022 15:29:45 +0100 Date: Thu, 08 Sep 2022 15:29:44 +0100 Message-ID: <87a67aueg7.wl-maz@kernel.org> From: Marc Zyngier To: "Gupta, Nipun" Cc: "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "gregkh@linuxfoundation.org" , "rafael@kernel.org" , "eric.auger@redhat.com" , "alex.williamson@redhat.com" , "cohuck@redhat.com" , "Gupta, Puneet (DCG-ENG)" , "song.bao.hua@hisilicon.com" , "mchehab+huawei@kernel.org" , "f.fainelli@gmail.com" , "jeffrey.l.hugo@gmail.com" , "saravanak@google.com" , "Michael.Srba@seznam.cz" , "mani@kernel.org" , "yishaih@nvidia.com" , "jgg@ziepe.ca" , "jgg@nvidia.com" , "robin.murphy@arm.com" , "will@kernel.org" , "joro@8bytes.org" , "masahiroy@kernel.org" , "ndesaulniers@google.com" , "linux-arm-kernel@lists.infradead.org" , "linux-kbuild@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "kvm@vger.kernel.org" , "okaya@kernel.org" , "Anand, Harpreet" , "Agarwal, Nikhil" , "Simek,\ Michal" , "Radovanovic, Aleksandar" , "git (AMD-Xilinx)" Subject: Re: [RFC PATCH v3 4/7] bus/cdx: add cdx-MSI domain with gic-its domain as parent In-Reply-To: References: <20220803122655.100254-1-nipun.gupta@amd.com> <20220906134801.4079497-1-nipun.gupta@amd.com> <20220906134801.4079497-5-nipun.gupta@amd.com> <87h71juxuk.wl-maz@kernel.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: Nipun.Gupta@amd.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org, rafael@kernel.org, eric.auger@redhat.com, alex.williamson@redhat.com, cohuck@redhat.com, puneet.gupta@amd.com, song.bao.hua@hisilicon.com, mchehab+huawei@kernel.org, f.fainelli@gmail.com, jeffrey.l.hugo@gmail.com, saravanak@google.com, Michael.Srba@seznam.cz, mani@kernel.org, yishaih@nvidia.com, jgg@ziepe.ca, jgg@nvidia.com, robin.murphy@arm.com, will@kernel.org, joro@8bytes.org, masahiroy@kernel.org, ndesaulniers@google.com, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, kvm@vger.kernel.org, okaya@kernel.org, harpreet.anand@amd.com, nikhil.agarwal@amd.com, michal.simek@amd.com, aleksandar.radovanovic@amd.com, git@amd.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220908_072948_868803_61B17E06 X-CRM114-Status: GOOD ( 25.11 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 08 Sep 2022 15:13:31 +0100, "Gupta, Nipun" wrote: > > > > > + return; > > > + > > > + msi_domain_free_irqs(msi_domain, dev); > > > +} > > > +EXPORT_SYMBOL(cdx_msi_domain_free_irqs); > > > > This feels like a very pointless helper, and again a copy/paste from > > the FSL code. I'd rather you change msi_domain_free_irqs() to only > > take a device and use the implicit MSI domain. > > I agree with other comments except this one. > > In current implementation we have an API "cdx_msi_domain_alloc_irqs()", > so having "cdx_msi_domain_free_irqs()" seems legitimate, as the caller > would allocate and free MSI's using a similar APIs (cdx_msi_domain*). Why would that be a problem? Using generic functions when they apply should be the default, and "specialised" helpers are only here as a reminder that our MSI API still needs serious improvement. > Changing msi_domain_free_irqs() to use implicit msi domain in case > msi_domain is not provided by the caller seems appropriate, Ill change the > same for "msi_domain_alloc_irqs()" too. What I'm asking is that there is no explicit msi_domain anymore. We always use the one referenced by the device. And if that can be done on the allocation path too, great. > <..> > > > > diff --git a/drivers/bus/cdx/mcdi_stubs.c b/drivers/bus/cdx/mcdi_stubs.c > > > index cc9d30fa02f8..2c8db1f5a057 100644 > > > --- a/drivers/bus/cdx/mcdi_stubs.c > > > +++ b/drivers/bus/cdx/mcdi_stubs.c > > > @@ -45,6 +45,7 @@ int cdx_mcdi_get_func_config(struct cdx_mcdi_t > > *cdx_mcdi, > > > dev_params->res_count = 2; > > > > > > dev_params->req_id = 0x250; > > > + dev_params->num_msi = 4; > > > > Why the hardcoded 4? Is that part of the firmware emulation stuff? > > Yes, this is currently part of emulation, and would change with proper > emulation support. What "proper emulation support"? I expect no emulation at all, but instead a well defined probing method. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel