summaryrefslogtreecommitdiff
path: root/drivers/iommu/iommu-debug.c
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2015-08-28 10:51:24 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:14:05 -0700
commit31cff0aa7f187d580cf6af267c50b0ffc0e64738 (patch)
treea314702f67c5e0acaf82adc572490ac7a2dcd103 /drivers/iommu/iommu-debug.c
parentc85a9eeb3fc9c04eaaca2a836728991dc5f2a364 (diff)
iommu/iommu-debug: Set DOMAIN_ATTR_ATOMIC during profiling
There's some non-deterministic latency incurred by enabling clocks and regulators. Clocks and regulators are left on for atomic domains, which makes them a good choice for profiling the page table management code. Use an atomic domain for map/unmap profiling to make things more deterministic. Change-Id: Ib9fa48699c9d6009dd3f3b322002e2fb0f2ff99c Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'drivers/iommu/iommu-debug.c')
-rw-r--r--drivers/iommu/iommu-debug.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/iommu/iommu-debug.c b/drivers/iommu/iommu-debug.c
index 1f9ba3156c33..f6f135c4354f 100644
--- a/drivers/iommu/iommu-debug.c
+++ b/drivers/iommu/iommu-debug.c
@@ -420,7 +420,7 @@ static void iommu_debug_device_profiling(struct seq_file *s, struct device *dev)
struct bus_type *bus;
unsigned long iova = 0x10000;
phys_addr_t paddr = 0xa000;
- int htw_disable = 1;
+ int htw_disable = 1, atomic_domain = 1;
bus = msm_iommu_get_bus(dev);
if (!bus)
@@ -438,6 +438,13 @@ static void iommu_debug_device_profiling(struct seq_file *s, struct device *dev)
goto out_domain_free;
}
+ if (iommu_domain_set_attr(domain, DOMAIN_ATTR_ATOMIC,
+ &atomic_domain)) {
+ seq_printf(s, "Couldn't set atomic_domain to %d\n",
+ atomic_domain);
+ goto out_domain_free;
+ }
+
if (iommu_attach_device(domain, dev)) {
seq_puts(s,
"Couldn't attach new domain to device. Is it already attached?\n");