A bunch of crap. initial dcvs, some hacks in f_projector, a hack delaying writeback_panel init so that device one is inited first, some missing files, some board/devices things ..
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 313f514..95b15d6 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -25,13 +25,14 @@
#define IOMMU_READ (1)
#define IOMMU_WRITE (2)
-#define IOMMU_CACHE (4)
+#define IOMMU_CACHE (4) /* DMA cache coherency */
struct iommu_ops;
struct bus_type;
struct device;
struct iommu_domain;
+/* iommu fault flags */
#define IOMMU_FAULT_READ 0x0
#define IOMMU_FAULT_WRITE 0x1
@@ -45,10 +46,23 @@
};
#define IOMMU_CAP_CACHE_COHERENCY 0x1
-#define IOMMU_CAP_INTR_REMAP 0x2
+#define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */
#ifdef CONFIG_IOMMU_API
+/**
+ * struct iommu_ops - iommu ops and capabilities
+ * @domain_init: init iommu domain
+ * @domain_destroy: destroy iommu domain
+ * @attach_dev: attach device to an iommu domain
+ * @detach_dev: detach device from an iommu domain
+ * @map: map a physically contiguous memory region to an iommu domain
+ * @unmap: unmap a physically contiguous memory region from an iommu domain
+ * @iova_to_phys: translate iova to physical address
+ * @domain_has_cap: domain capabilities query
+ * @commit: commit iommu domain
+ * @pgsize_bitmap: bitmap of supported page sizes
+ */
struct iommu_ops {
int (*domain_init)(struct iommu_domain *domain, int flags);
void (*domain_destroy)(struct iommu_domain *domain);
@@ -96,18 +110,46 @@
iommu_fault_handler_t handler);
extern int iommu_device_group(struct device *dev, unsigned int *groupid);
+/**
+ * report_iommu_fault() - report about an IOMMU fault to the IOMMU framework
+ * @domain: the iommu domain where the fault has happened
+ * @dev: the device where the fault has happened
+ * @iova: the faulting address
+ * @flags: mmu fault flags (e.g. IOMMU_FAULT_READ/IOMMU_FAULT_WRITE/...)
+ *
+ * This function should be called by the low-level IOMMU implementations
+ * whenever IOMMU faults happen, to allow high-level users, that are
+ * interested in such events, to know about them.
+ *
+ * This event may be useful for several possible use cases:
+ * - mere logging of the event
+ * - dynamic TLB/PTE loading
+ * - if restarting of the faulting device is required
+ *
+ * Returns 0 on success and an appropriate error code otherwise (if dynamic
+ * PTE/TLB loading will one day be supported, implementations will be able
+ * to tell whether it succeeded or not according to this return value).
+ *
+ * Specifically, -ENOSYS is returned if a fault handler isn't installed
+ * (though fault handlers can also return -ENOSYS, in case they want to
+ * elicit the default behavior of the IOMMU drivers).
+ */
static inline int report_iommu_fault(struct iommu_domain *domain,
struct device *dev, unsigned long iova, int flags)
{
int ret = -ENOSYS;
+ /*
+ * if upper layers showed interest and installed a fault handler,
+ * invoke it.
+ */
if (domain->handler)
ret = domain->handler(domain, dev, iova, flags);
return ret;
}
-#else
+#else /* CONFIG_IOMMU_API */
struct iommu_ops {};
@@ -188,6 +230,6 @@
return -ENODEV;
}
-#endif
+#endif /* CONFIG_IOMMU_API */
-#endif
+#endif /* __LINUX_IOMMU_H */