powerpc/eeh: Reduce use of pci_dn::node
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Tue, 29 Aug 2017 07:34:03 +0000 (17:34 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Aug 2017 04:26:10 +0000 (14:26 +1000)
commit14db3d52d3a214ae8132a403de410af7643cb8b0
tree5d1ca8f8e047066d97078049f811d92410849e54
parent405b33a76d26e426276c088b38dc7efba7538ff2
powerpc/eeh: Reduce use of pci_dn::node

The pci_dn struct caches a OF device node pointer in order to access
the "ibm,loc-code" property when EEH is recovering.

However, when this happens in eeh_dev_check_failure(), we also have
a pci_dev pointer which should have a valid pointer to the device node
when pci_dn has one (both pointers are not NULL for physical functions
and are NULL for virtual functions).

This changes pci_remove_device_node_info() to look for a parent of
the node being removed, just like pci_add_device_node_info() does when it
references the parent node.

This is the first step to get rid of pci_dn::node.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh.c
arch/powerpc/kernel/pci_dn.c