Skip to content

Commit

Permalink
pci-hotplug/pnv_php: Add support for IODA3 Power9 PHBs
Browse files Browse the repository at this point in the history
Currently we check that an IODA2 compatible PHB is upstream of this slot.
This is mainly to avoid pnv_php creating slots for the various "virtual
PHBs" that we create for NVLink. There's no real need for this restriction
so allow it on IODA3.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190903101605.2890-10-oohall@gmail.com
  • Loading branch information
Oliver O'Halloran authored and Michael Ellerman committed Sep 5, 2019
1 parent 7fd1fe4 commit a839bd8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/powerpc/platforms/powernv/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ int pnv_pci_get_slot_id(struct device_node *np, uint64_t *id)
break;
}

if (!of_device_is_compatible(parent, "ibm,ioda2-phb")) {
if (!of_device_is_compatible(parent, "ibm,ioda2-phb") &&
!of_device_is_compatible(parent, "ibm,ioda3-phb")) {
of_node_put(parent);
continue;
}
Expand Down
6 changes: 6 additions & 0 deletions drivers/pci/hotplug/pnv_php.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,9 @@ static int __init pnv_php_init(void)
for_each_compatible_node(dn, NULL, "ibm,ioda2-phb")
pnv_php_register(dn);

for_each_compatible_node(dn, NULL, "ibm,ioda3-phb")
pnv_php_register(dn);

return 0;
}

Expand All @@ -1003,6 +1006,9 @@ static void __exit pnv_php_exit(void)

for_each_compatible_node(dn, NULL, "ibm,ioda2-phb")
pnv_php_unregister(dn);

for_each_compatible_node(dn, NULL, "ibm,ioda3-phb")
pnv_php_unregister(dn);
}

module_init(pnv_php_init);
Expand Down

0 comments on commit a839bd8

Please sign in to comment.