[PATCH kernel 5/5] powerpc/eeh: Remove unnecessary node from pci_dn

Michael Ellerman mpe at ellerman.id.au
Mon Aug 28 16:27:54 AEST 2017


Alexey Kardashevskiy <aik at ozlabs.ru> writes:

> 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 removes the node pointer from the pci_dn struct and used pdev
> in eeh_dev_check_failure() instead.
>
> 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.
>
> Signed-off-by: Alexey Kardashevskiy <aik at ozlabs.ru>
> ---
>  arch/powerpc/include/asm/pci-bridge.h | 1 -
>  arch/powerpc/kernel/eeh.c             | 9 +++++----
>  arch/powerpc/kernel/pci_dn.c          | 8 +++++---
>  3 files changed, 10 insertions(+), 8 deletions(-)

  arch/powerpc/platforms/pseries/msi.c: In function ‘check_req’:
  arch/powerpc/platforms/pseries/msi.c:143:10: error: ‘struct pci_dn’ has no member named ‘node’
  dn = pdn->node;
          ^~
  arch/powerpc/platforms/pseries/msi.c: In function ‘find_pe_dn’:
  arch/powerpc/platforms/pseries/msi.c:214:16: error: ‘struct pci_dn’ has no member named ‘node’
  dn = pdn ? pdn->node : NULL;
                ^~
cheers


More information about the Linuxppc-dev mailing list