diff options
| author | Sudarshan Rajagopalan <sudaraja@codeaurora.org> | 2017-04-04 19:10:06 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-05-02 10:32:42 -0700 |
| commit | 058ccb29334351370324ca45d753708718714827 (patch) | |
| tree | 5890f1e4bb0bc6a52b25036c2e20b63caf9d3c2e /include/linux | |
| parent | 82fffc58bfceb6e2d5c183eced7d9bc8c6eac3bc (diff) | |
iommu/iommu-debug: Add validation support for per-buffer coherent mappings
Added new debugfs files/nodes to perform basic validation of the
per-buffer IO coherent dma-mapping that was recently implemented.
Also, added a node to print out the PTE for a given IOVA.
Nodes added:
dma_attach
dma_map
dma_unmap
dma_atos
virt_addr
pte
Change-Id: I041ab5f4e37e50dd3f58e2def3fdd3125a60629c
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/iommu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 55ae8b928411..2767fcdec5a1 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -235,6 +235,8 @@ struct iommu_ops { void (*tlbi_domain)(struct iommu_domain *domain); int (*enable_config_clocks)(struct iommu_domain *domain); void (*disable_config_clocks)(struct iommu_domain *domain); + uint64_t (*iova_to_pte)(struct iommu_domain *domain, + dma_addr_t iova); #ifdef CONFIG_OF_IOMMU int (*of_xlate)(struct device *dev, struct of_phandle_args *args); @@ -334,6 +336,9 @@ extern int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr, phys_addr_t offset, u64 size, int prot); extern void iommu_domain_window_disable(struct iommu_domain *domain, u32 wnd_nr); + +extern uint64_t iommu_iova_to_pte(struct iommu_domain *domain, + dma_addr_t iova); /** * report_iommu_fault() - report about an IOMMU fault to the IOMMU framework * @domain: the iommu domain where the fault has happened |
