projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git]
/
include
/
linux
/
iommu.h
diff --git
a/include/linux/iommu.h
b/include/linux/iommu.h
index 8a7bfb1b6ca09c4275b99187b74c807bd6bdb9ae..3af4ffd591b978c4f7f815a5952131a0b673aa13 100644
(file)
--- a/
include/linux/iommu.h
+++ b/
include/linux/iommu.h
@@
-21,6
+21,7
@@
#define IOMMU_READ (1)
#define IOMMU_WRITE (2)
#define IOMMU_READ (1)
#define IOMMU_WRITE (2)
+#define IOMMU_CACHE (4) /* DMA cache coherency */
struct device;
struct device;
@@
-28,6
+29,8
@@
struct iommu_domain {
void *priv;
};
void *priv;
};
+#define IOMMU_CAP_CACHE_COHERENCY 0x1
+
struct iommu_ops {
int (*domain_init)(struct iommu_domain *domain);
void (*domain_destroy)(struct iommu_domain *domain);
struct iommu_ops {
int (*domain_init)(struct iommu_domain *domain);
void (*domain_destroy)(struct iommu_domain *domain);
@@
-39,6
+42,8
@@
struct iommu_ops {
size_t size);
phys_addr_t (*iova_to_phys)(struct iommu_domain *domain,
unsigned long iova);
size_t size);
phys_addr_t (*iova_to_phys)(struct iommu_domain *domain,
unsigned long iova);
+ int (*domain_has_cap)(struct iommu_domain *domain,
+ unsigned long cap);
};
#ifdef CONFIG_IOMMU_API
};
#ifdef CONFIG_IOMMU_API
@@
-57,6
+62,8
@@
extern void iommu_unmap_range(struct iommu_domain *domain, unsigned long iova,
size_t size);
extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
unsigned long iova);
size_t size);
extern phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
unsigned long iova);
+extern int iommu_domain_has_cap(struct iommu_domain *domain,
+ unsigned long cap);
#else /* CONFIG_IOMMU_API */
#else /* CONFIG_IOMMU_API */
@@
-107,6
+114,12
@@
static inline phys_addr_t iommu_iova_to_phys(struct iommu_domain *domain,
return 0;
}
return 0;
}
+static inline int domain_has_cap(struct iommu_domain *domain,
+ unsigned long cap)
+{
+ return 0;
+}
+
#endif /* CONFIG_IOMMU_API */
#endif /* __LINUX_IOMMU_H */
#endif /* CONFIG_IOMMU_API */
#endif /* __LINUX_IOMMU_H */