From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from exprod5og108.obsmtp.com ([64.18.0.186]:55843 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753328AbbDGT5T (ORCPT ); Tue, 7 Apr 2015 15:57:19 -0400 Received: by oblw8 with SMTP id w8so56619878obl.0 for ; Tue, 07 Apr 2015 12:57:18 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5509C951.30402@arm.com> References: <5509BE7C.1000901@arm.com> <5509C951.30402@arm.com> From: Duc Dang Date: Tue, 7 Apr 2015 12:56:48 -0700 Message-ID: Subject: Re: [PATCH v2 1/4] PCI: X-Gene: Add the APM X-Gene v1 PCIe MSI/MSIX termination driver To: Marc Zyngier Cc: Bjorn Helgaas , Arnd Bergmann , "grant.likely@linaro.org" , Liviu Dudau , Feng Kan , "linux-pci@vger.kernel.org" , Tanmay Inamdar , "linux-arm-kernel@lists.infradead.org" , Loc Ho Content-Type: text/plain; charset=UTF-8 Sender: linux-pci-owner@vger.kernel.org List-ID: On Wed, Mar 18, 2015 at 11:52 AM, Marc Zyngier wrote: > On 18/03/15 18:29, Duc Dang wrote: >> On Wed, Mar 18, 2015 at 11:05 AM, Marc Zyngier wrote: >>> On 04/03/15 19:39, Duc Dang wrote: >>>> X-Gene v1 SOC supports total 2688 MSI/MSIX vectors coalesced into >>>> 16 HW IRQ lines. >>>> >>>> Signed-off-by: Duc Dang >>>> Signed-off-by: Tanmay Inamdar >>> >>> I just had a quick look at this, and this seems to be going in the exact >>> opposite direction compared to what we now have on arm64, where we move >>> away from using struct msi_controller for most thing, and implement PCI >>> MSI/MSIX in a generic way, using MSI domains. >>> >>> I suggest you have a look at how GICv2m and GICv3 ITS implement the MSI >>> support. You can also have a look at what I did for the Tegra MSI >>> controller in this patch: >>> >>> https://git.kernel.org/cgit/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/kill-msi-controller&id=83b3602fcee7972b9d549ed729b56ec28de16081 >>> >>> Eventually, the plan is to kill msi_controller entirely, so introducing >>> new drivers that rely on it is not something I'm eager to see. >> >> Thanks, Marc. >> >> X-Gene 1 MSI is handled by separate MSI controller block, so its >> driver implementation is different from GICv2m and GICv3. I will refer > > It will certainly be different in the sense that you won't use a stacked > domain on top of the GIC. But what I want to see is the use of a generic > pci_msi_domain on top of an irq_domain, just like we have on v2m and v3. > Thomas has also been vocal enough about that in the past, and x86 is > going down that road as well. > >> to what you did for Tegra MSI, but I don't see your latest changes in >> 4.0-rc4. Is the change you made for Tegra MSI going to mainline soon? > > Not yet. As you can see in this branch, this relies on some other > cleanups. But you can already convert most of your driver and put it in > the shape that matches what we have for v2m and v3. Once the required > cleanups are in, I'll remove the last traces of msi_controller myself if > necessary. > Hi Marc, Bjorn, I follow Marc's suggestion and convert my X-Gene 1 MSI driver to remove msi_controller struct and use generic pci_msi_domain on top of an irq_domain. The code requires Marc's changes in irq/kill-msi-controller branch to be compiled and function correctly, so I plan to post the patch on top of Marc's tree. Please let me know if you think I should have different approach to post this patch. Another question I have is when do you plan to roll out this hierarchy irq domain implementation for MSI, as I see some of Marc's changes to kill msi_controller structure and implement MSI irq domain still does not get into Bjorn's tree. Regards, Duc Dang. > Thanks, > > M. > -- > Jazz is not dead. It just smells funny... From mboxrd@z Thu Jan 1 00:00:00 1970 From: dhdang@apm.com (Duc Dang) Date: Tue, 7 Apr 2015 12:56:48 -0700 Subject: [PATCH v2 1/4] PCI: X-Gene: Add the APM X-Gene v1 PCIe MSI/MSIX termination driver In-Reply-To: <5509C951.30402@arm.com> References: <5509BE7C.1000901@arm.com> <5509C951.30402@arm.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Mar 18, 2015 at 11:52 AM, Marc Zyngier wrote: > On 18/03/15 18:29, Duc Dang wrote: >> On Wed, Mar 18, 2015 at 11:05 AM, Marc Zyngier wrote: >>> On 04/03/15 19:39, Duc Dang wrote: >>>> X-Gene v1 SOC supports total 2688 MSI/MSIX vectors coalesced into >>>> 16 HW IRQ lines. >>>> >>>> Signed-off-by: Duc Dang >>>> Signed-off-by: Tanmay Inamdar >>> >>> I just had a quick look at this, and this seems to be going in the exact >>> opposite direction compared to what we now have on arm64, where we move >>> away from using struct msi_controller for most thing, and implement PCI >>> MSI/MSIX in a generic way, using MSI domains. >>> >>> I suggest you have a look at how GICv2m and GICv3 ITS implement the MSI >>> support. You can also have a look at what I did for the Tegra MSI >>> controller in this patch: >>> >>> https://git.kernel.org/cgit/linux/kernel/git/maz/arm-platforms.git/commit/?h=irq/kill-msi-controller&id=83b3602fcee7972b9d549ed729b56ec28de16081 >>> >>> Eventually, the plan is to kill msi_controller entirely, so introducing >>> new drivers that rely on it is not something I'm eager to see. >> >> Thanks, Marc. >> >> X-Gene 1 MSI is handled by separate MSI controller block, so its >> driver implementation is different from GICv2m and GICv3. I will refer > > It will certainly be different in the sense that you won't use a stacked > domain on top of the GIC. But what I want to see is the use of a generic > pci_msi_domain on top of an irq_domain, just like we have on v2m and v3. > Thomas has also been vocal enough about that in the past, and x86 is > going down that road as well. > >> to what you did for Tegra MSI, but I don't see your latest changes in >> 4.0-rc4. Is the change you made for Tegra MSI going to mainline soon? > > Not yet. As you can see in this branch, this relies on some other > cleanups. But you can already convert most of your driver and put it in > the shape that matches what we have for v2m and v3. Once the required > cleanups are in, I'll remove the last traces of msi_controller myself if > necessary. > Hi Marc, Bjorn, I follow Marc's suggestion and convert my X-Gene 1 MSI driver to remove msi_controller struct and use generic pci_msi_domain on top of an irq_domain. The code requires Marc's changes in irq/kill-msi-controller branch to be compiled and function correctly, so I plan to post the patch on top of Marc's tree. Please let me know if you think I should have different approach to post this patch. Another question I have is when do you plan to roll out this hierarchy irq domain implementation for MSI, as I see some of Marc's changes to kill msi_controller structure and implement MSI irq domain still does not get into Bjorn's tree. Regards, Duc Dang. > Thanks, > > M. > -- > Jazz is not dead. It just smells funny...