[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch V2 34/46] PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable
- To: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
- From: Jason Gunthorpe <jgg@xxxxxxxxxx>
- Date: Fri, 28 Aug 2020 09:19:44 -0300
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OGx9hDmAfgVaIDDyEUWtLiXLoSqpVp8tJKifKU9se5A=; b=ZyMsJ5oH4W9hQN+dgOt5m7Q5fSv4DRnKrszrAJlcYU9JasjYpTVO2V17tBZ2glAwoeAEBb+iZYcG+dB2PxmZ1XX3QtZgF0etYWdqUm4dt5/jojZ3/FnuX8lCbKmBARnWwZlheZPLqxm8SSgA8eYlCfhB7ExGT/nnMF9jilUtP7wqJO+Mtm4rih86hL2RdDJNzN927oH4SI9bQjT9lpUXYU7nBvYvHcXIkpXAvLrUuSePX0ab+FVunG1pDisDVt2quc7RZ7+1y0VBmfpijnR3lZMJn8aXf1Ci0c+LQEeRNNNAwi9lvFS85+3jWJUM5Ou+xEsarKBI4je/Hlwi9xa/4Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hebqKh7w1CN5QSqokmyTFT4aQRaSHymEVBca0fyE55So0jv8ZChGzK5BYrtoJREMXoVz971RIS9cCnG1++EnjNsAozYphCt/ShQKc6HzCd45HJk7Og6UtqxQdE+I3lT9z/xTM1rYnQWdV899K9GauIU4IKsUX5uqk85zIfQBCxSFG1lSnIZbHJqRWzSTxSW6bJGYW75/LABOzIMjEess8i2/1MHvixA5AwBW2W5fT3huuDCTEONL7RsFacQcWXF8t7dhJxo3mvxfIe35UUo9/3ZqdntpjhOFOWI4zWU7bU/4rDBfwB/cOJwV257nfFeuVXiXdPlO9A4h8yeXFGbiDw==
- Authentication-results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=nvidia.com;
- Cc: Bjorn Helgaas <helgaas@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, <x86@xxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, <iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx>, <linux-hyperv@xxxxxxxxxxxxxxx>, Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>, "Jon Derrick" <jonathan.derrick@xxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>, Wei Liu <wei.liu@xxxxxxxxxx>, "K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>, "Stephen Hemminger" <sthemmin@xxxxxxxxxxxxx>, Steve Wahl <steve.wahl@xxxxxxx>, "Dimitri Sivanich" <sivanich@xxxxxxx>, Russ Anderson <rja@xxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, "Konrad Rzeszutek Wilk" <konrad.wilk@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, "Rafael J. Wysocki" <rafael@xxxxxxxxxx>, "Megha Dey" <megha.dey@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, "Alex Williamson" <alex.williamson@xxxxxxxxxx>, Jacob Pan <jacob.jun.pan@xxxxxxxxx>, Baolu Lu <baolu.lu@xxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Dan Williams <dan.j.williams@xxxxxxxxx>, "Rob Herring" <robh@xxxxxxxxxx>
- Delivery-date: Fri, 28 Aug 2020 12:20:19 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Aug 28, 2020 at 12:21:42PM +0100, Lorenzo Pieralisi wrote:
> On Thu, Aug 27, 2020 at 01:20:40PM -0500, Bjorn Helgaas wrote:
>
> [...]
>
> > And I can't figure out what's special about tegra, rcar, and xilinx
> > that makes them need it as well. Is there something I could grep for
> > to identify them? Is there a way to convert them so they don't need
> > it?
>
> I think DT binding and related firmware support are needed to setup the
> MSI IRQ domains correctly, there is nothing special about tegra, rcar
> and xilinx AFAIK (well, all native host controllers MSI handling is
> *special* just to be polite but let's gloss over this for the time
> being).
>
> struct msi_controller, to answer the first question.
>
> I have doubts about pci_mvebu too, they do allocate an msi_controller
> but without methods so it looks pretty much useless.
Oh, I did once know things about mvebu..
I suspect the msi controller pointer assignment is dead code at this
point. The only implementation of MSI with that PCI root port is
drivers/irqchip/irq-armada-370-xp.c which looks like it uses
irq_domain.
Actually looks like things are very close to eliminating
msi_controller.
This is dead code, can't find a setter for hw_pci->msi_ctrl:
arch/arm/include/asm/mach/pci.h: struct msi_controller *msi_ctrl;
arch/arm/kernel/bios32.c: bridge->msi =
hw->msi_ctrl;
This is probably just copying NULL from one place to another:
drivers/pci/controller/pci-mvebu.c: struct msi_controller *msi;
These need conversion to irq_domain (right?):
drivers/pci/controller/pci-hyperv.c: struct msi_controller msi_chip;
drivers/pci/controller/pci-tegra.c: struct msi_controller chip;
drivers/pci/controller/pcie-rcar-host.c: struct msi_controller chip;
drivers/pci/controller/pcie-xilinx.c:static struct msi_controller
xilinx_pcie_msi_chip = {
Then the stuff in drivers/pci/msi.c can go away.
So the arch_setup_msi_irq/etc is not really an arch hook, but some
infrastructure to support those 4 PCI root port drivers.
Jason
|