x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata
[sfrench/cifs-2.6.git] / include / asm-x86_64 / pci.h
index bda94fd5176f43a70c431f0079aeb6715d30a78e..88926eb44f5cb764b3a5db8e2ff6046709469b9a 100644 (file)
@@ -5,6 +5,25 @@
 
 #ifdef __KERNEL__
 
+struct pci_sysdata {
+       int             node;           /* NUMA node */
+       void*           iommu;          /* IOMMU private data */
+};
+
+#ifdef CONFIG_CALGARY_IOMMU
+static inline void* pci_iommu(struct pci_bus *bus)
+{
+       struct pci_sysdata *sd = bus->sysdata;
+       return sd->iommu;
+}
+
+static inline void set_pci_iommu(struct pci_bus *bus, void *val)
+{
+       struct pci_sysdata *sd = bus->sysdata;
+       sd->iommu = val;
+}
+#endif /* CONFIG_CALGARY_IOMMU */
+
 #include <linux/mm.h> /* for struct page */
 
 /* Can be used to override the logic in pci_scan_bus for skipping