Skip to content

Commit 786e5b1

Browse files
legoatermpe
authored andcommitted
powerpc/pseries/pci: Introduce __find_pe_total_msi()
It will help to size the PCI MSI domain. Signed-off-by: Cédric Le Goater <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 2ac78e0 commit 786e5b1

File tree

1 file changed

+7
-2
lines changed
  • arch/powerpc/platforms/pseries

1 file changed

+7
-2
lines changed

arch/powerpc/platforms/pseries/msi.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,12 +164,12 @@ static int check_req_msix(struct pci_dev *pdev, int nvec)
164164

165165
/* Quota calculation */
166166

167-
static struct device_node *find_pe_total_msi(struct pci_dev *dev, int *total)
167+
static struct device_node *__find_pe_total_msi(struct device_node *node, int *total)
168168
{
169169
struct device_node *dn;
170170
const __be32 *p;
171171

172-
dn = of_node_get(pci_device_to_OF_node(dev));
172+
dn = of_node_get(node);
173173
while (dn) {
174174
p = of_get_property(dn, "ibm,pe-total-#msi", NULL);
175175
if (p) {
@@ -185,6 +185,11 @@ static struct device_node *find_pe_total_msi(struct pci_dev *dev, int *total)
185185
return NULL;
186186
}
187187

188+
static struct device_node *find_pe_total_msi(struct pci_dev *dev, int *total)
189+
{
190+
return __find_pe_total_msi(pci_device_to_OF_node(dev), total);
191+
}
192+
188193
static struct device_node *find_pe_dn(struct pci_dev *dev, int *total)
189194
{
190195
struct device_node *dn;

0 commit comments

Comments
 (0)