]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Revert "powerpc/pci: Remove unused struct pci_dn.pcidev field"
authorAlistair Popple <alistair@popple.id.au>
Thu, 17 Dec 2015 02:43:11 +0000 (13:43 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 17 Dec 2015 11:40:59 +0000 (22:40 +1100)
This commit removed the pcidev field from struct pci_dn as it was no
longer in use by the kernel. However to support finding the
association of Nvlink devices to GPU devices from the device-tree this
field is required.

This reverts commit 250c7b277c65 ("powerpc/pci: Remove unused struct
pci_dn.pcidev field").

Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/platforms/powernv/pci-ioda.c

index 37fc53587bb45b04d06b6601c19411aa6738edb8..54843ca5fa2bfa03871f28a3854b0d87f5685a76 100644 (file)
@@ -205,6 +205,7 @@ struct pci_dn {
 
        int     pci_ext_config_space;   /* for pci devices */
 
+       struct  pci_dev *pcidev;        /* back-pointer to the pci device */
 #ifdef CONFIG_EEH
        struct eeh_dev *edev;           /* eeh device */
 #endif
index 272f6566d790cddc175673b0bc97f1913540cc03..258ece5c0a8ffadba187fa8eaf430ed2b33f6227 100644 (file)
@@ -1008,6 +1008,7 @@ static void pnv_ioda_setup_same_PE(struct pci_bus *bus, struct pnv_ioda_pe *pe)
                                pci_name(dev));
                        continue;
                }
+               pdn->pcidev = dev;
                pdn->pe_number = pe->pe_number;
                pe->dma_weight += pnv_ioda_dma_weight(dev);
                if ((pe->flags & PNV_IODA_PE_BUS_ALL) && dev->subordinate)