From: Kishon Vijay Abraham I <kishon@ti.com> To: Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org>, Bjorn Helgaas <bhelgaas@google.com> Cc: <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Kishon Vijay Abraham I <kishon@ti.com>, <lokeshvutla@ti.com> Subject: [PATCH 2/3] PCI: Export find_pci_root_bus() Date: Mon, 20 Sep 2021 12:11:32 +0530 [thread overview] Message-ID: <20210920064133.14115-3-kishon@ti.com> (raw) In-Reply-To: <20210920064133.14115-1-kishon@ti.com> Export find_pci_root_bus() in order for other subsystems (like IRQCHIP) to find the root bus of a particual PCIe device. This is done in preparation for GIC ITS to walk the PCIe bus for calculating the total number of interrupt vectors that has to be supported by a specific GIC ITS device ID, specifically when "msi-map-mask" is populated in device tree. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> --- drivers/pci/host-bridge.c | 3 ++- include/linux/pci.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index afa50b446567..4ec34d040c02 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -9,13 +9,14 @@ #include "pci.h" -static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) +struct pci_bus *find_pci_root_bus(struct pci_bus *bus) { while (bus->parent) bus = bus->parent; return bus; } +EXPORT_SYMBOL_GPL(find_pci_root_bus); struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus) { diff --git a/include/linux/pci.h b/include/linux/pci.h index 8500fec56e50..b33ef3e08a2f 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1475,6 +1475,7 @@ int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, void __pci_walk_bus(struct pci_bus *top, int (*cb)(struct pci_dev *, void *), void *userdata, u32 rid, u32 mask); +struct pci_bus *find_pci_root_bus(struct pci_bus *bus); int pci_cfg_space_size(struct pci_dev *dev); unsigned char pci_bus_max_busnr(struct pci_bus *bus); void pci_setup_bridge(struct pci_bus *bus); -- 2.17.1
next prev parent reply other threads:[~2021-09-20 6:42 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-09-20 6:41 [PATCH 0/3] PCI/gic-v3-its: Add support for same ITS device ID for multiple PCIe devices Kishon Vijay Abraham I 2021-09-20 6:41 ` [PATCH 1/3] PCI: Add support in pci_walk_bus() to invoke callback matching RID Kishon Vijay Abraham I 2021-09-20 8:56 ` Marc Zyngier 2021-09-20 14:28 ` Kishon Vijay Abraham I 2021-09-20 18:01 ` Marc Zyngier 2021-09-22 1:26 ` Kishon Vijay Abraham I 2021-09-27 14:45 ` Marc Zyngier 2021-09-27 14:56 ` Kishon Vijay Abraham I 2021-09-20 6:41 ` Kishon Vijay Abraham I [this message] 2021-09-20 8:37 ` [PATCH 2/3] PCI: Export find_pci_root_bus() Marc Zyngier 2021-09-20 6:41 ` [PATCH 3/3] irqchip/gic-v3-its: Include "msi-map-mask" for calculating nvecs Kishon Vijay Abraham I 2021-09-20 8:36 ` Marc Zyngier 2021-09-20 9:14 ` [PATCH 0/3] PCI/gic-v3-its: Add support for same ITS device ID for multiple PCIe devices Marc Zyngier 2021-09-20 11:22 ` Kishon Vijay Abraham I 2021-09-20 11:36 ` Marc Zyngier
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210920064133.14115-3-kishon@ti.com \ --to=kishon@ti.com \ --cc=bhelgaas@google.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=lokeshvutla@ti.com \ --cc=lorenzo.pieralisi@arm.com \ --cc=maz@kernel.org \ --cc=tglx@linutronix.de \ --subject='Re: [PATCH 2/3] PCI: Export find_pci_root_bus()' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.