summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/device.h
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2015-03-17 06:15:02 +0100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2015-03-24 03:15:49 +0100
commitcca87d303c85b257a7b0fd34f9d6fce1c59880a2 (patch)
tree4145eab3e328314e60b9dcc3590616a93aa7bb90 /arch/powerpc/include/asm/device.h
parentnet/ethernet/sfc: Don't use of_node_to_eeh_dev() (diff)
downloadlinux-cca87d303c85b257a7b0fd34f9d6fce1c59880a2.tar.xz
linux-cca87d303c85b257a7b0fd34f9d6fce1c59880a2.zip
powerpc/pci: Refactor pci_dn
Currently, the PCI config accessors are implemented based on device node. Unfortunately, SRIOV VFs won't have the corresponding device nodes. pci_dn will be used in replacement with device node for SRIOV VFs. So we have to use pci_dn in PCI config accessors. The patch refactors pci_dn in following aspects to make it ready to be used in PCI config accessors as we do in subsequent patch: * pci_dn is organized as a hierarchy tree. PCI device's pci_dn is put to the child list of pci_dn of its upstream bridge or PHB. VF's pci_dn will be put to the child list of pci_dn of PF's bridge. * For one particular PCI device (VF or not), its pci_dn can be found from pdev->dev.archdata.pci_data, PCI_DN(devnode), or parent's list. The fast path (fetching pci_dn through PCI device instance) is populated during early fixup time. [bhelgaas: changelog] Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/include/asm/device.h')
-rw-r--r--arch/powerpc/include/asm/device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h
index 38faeded7d59..9f1371bab5fc 100644
--- a/arch/powerpc/include/asm/device.h
+++ b/arch/powerpc/include/asm/device.h
@@ -8,6 +8,9 @@
struct dma_map_ops;
struct device_node;
+#ifdef CONFIG_PPC64
+struct pci_dn;
+#endif
/*
* Arch extensions to struct device.
@@ -34,6 +37,9 @@ struct dev_archdata {
#ifdef CONFIG_SWIOTLB
dma_addr_t max_direct_dma_addr;
#endif
+#ifdef CONFIG_PPC64
+ struct pci_dn *pci_data;
+#endif
#ifdef CONFIG_EEH
struct eeh_dev *edev;
#endif