[Skiboot] [PATCH 3/4] PCI: Introduce phb_ops->phb_final_fixup()

Stewart Smith stewart at linux.vnet.ibm.com
Tue May 3 19:08:15 AEST 2016

Gavin Shan <gwshan at linux.vnet.ibm.com> writes:
> phb_ops->device_node_fixup() was introduced for NPU1 so that the
> chip backend can bind the emulated NPU device with the GPU device
> and fixes the device-tree node accordingly. There're couple of
> issues as I can image:
>    * In pci_fixup_nodes(), one PHB has only one level of device
>      depth in the hierarchy tree. It's true for NPU PHBs, but
>      false for other PHBs. That indicates the function can be
>      called for NPU PHBs.
>    * The callback name indicates the specific work to be done
>      there. That doesn't make sense. We need another name without
>      indicating the specific work to do. It will give the backend
>      on chip level more freedom. Similarly, the callback is called
>      on basis of PCI device. It's hard for backend to manuplate
>      the PHB. More freedom the backend will get with more bold
>      granularity.
> This fixes above issues by replacing phb_ops->device_node_fixup()
> with phb_ops->phb_final_fixup(). More freedom will be received in
> the backends.
> Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
> ---
>  core/pci.c    | 19 ++++---------------
>  hw/npu.c      | 15 ++++++++++++---
>  include/pci.h |  7 ++-----
>  3 files changed, 18 insertions(+), 23 deletions(-)

Merged to master as of 1abcd49

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list