};
/*
- * Xen: Information about each device stored in dev->archdata.iommu
+ * Xen: Information about each device stored in dev->iommu
*
- * Initially dev->archdata.iommu only stores the iommu_domain (runtime
+ * Initially dev->iommu only stores the iommu_domain (runtime
* configuration of the SMMU) but, on Xen, we also have to store the
* iommu_group (list of streamIDs associated to the device).
*
struct iommu_group *group;
};
-#define dev_archdata(dev) ((struct arm_smmu_xen_device *)dev->archdata.iommu)
+#define dev_archdata(dev) ((struct arm_smmu_xen_device *)dev->iommu)
#define dev_iommu_domain(dev) (dev_archdata(dev)->domain)
#define dev_iommu_group(dev) (dev_archdata(dev)->group)
xen_domain = dom_iommu(d)->arch.priv;
- if (!dev->archdata.iommu) {
- dev->archdata.iommu = xzalloc(struct arm_smmu_xen_device);
- if (!dev->archdata.iommu)
+ if (!dev->iommu) {
+ dev->iommu = xzalloc(struct arm_smmu_xen_device);
+ if (!dev->iommu)
return -ENOMEM;
}
DEVICE_UNKNOWN,
};
-struct dev_archdata {
-#ifdef CONFIG_HAS_PASSTHROUGH
- void *iommu; /* IOMMU private data */
-#endif
-};
-
/* struct device - The basic device structure */
struct device
{
#ifdef CONFIG_HAS_DEVICE_TREE
struct dt_device_node *of_node; /* Used by drivers imported from Linux */
#endif
- struct dev_archdata archdata;
#ifdef CONFIG_HAS_PASSTHROUGH
+ void *iommu; /* IOMMU private data */;
struct iommu_fwspec *iommu_fwspec; /* per-device IOMMU instance data */
#endif
};