iommu: iommu-debug: Rework CONFIG_IOMMU_DEBUG_TRACKING
If CONFIG_IOMMU_DEBUG_TRACKING=y, a deadlock will occur if userspace
writes to the debugfs file "attach":
-001|context_switch(inline)
-001|__schedule()
-002|__preempt_count_sub(inline)
-002|schedule()
-003|schedule_timeout()
-004|do_wait_for_common(inline)
-004|__wait_for_common(inline)
-004|wait_for_common()
-005|wait_for_completion()
-006|__synchronize_srcu()
-007|synchronize_srcu()
-008|debugfs_remove_recursive()
-009|iommu_debug_detach_device()
-010|__iommu_detach_device()
-011|__iommu_group_for_each_dev(inline)
-011|__iommu_detach_group()
-012|iommu_detach_device()
-013|iommu_debug_device_profiling()
-014|iommu_debug_device_show()
-015|seq_read()
-016|full_proxy_read()
-017|__vfs_read()
-018|vfs_read()
Since the files in the attachment directory are rarely used, remove
them. Update the data saved by this config option to work properly
with iommu groups.
Change-Id: I3f0f1d0836f37412915ce3e78d8aefe92dc8d096
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
diff --git a/drivers/iommu/iommu-debug.h b/drivers/iommu/iommu-debug.h
index 94a97bf..91c418d 100644
--- a/drivers/iommu/iommu-debug.h
+++ b/drivers/iommu/iommu-debug.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -16,8 +16,6 @@
#ifdef CONFIG_IOMMU_DEBUG_TRACKING
void iommu_debug_attach_device(struct iommu_domain *domain, struct device *dev);
-void iommu_debug_detach_device(struct iommu_domain *domain, struct device *dev);
-void iommu_debug_domain_add(struct iommu_domain *domain);
void iommu_debug_domain_remove(struct iommu_domain *domain);
#else /* !CONFIG_IOMMU_DEBUG_TRACKING */
@@ -27,15 +25,6 @@
{
}
-static inline void iommu_debug_detach_device(struct iommu_domain *domain,
- struct device *dev)
-{
-}
-
-static inline void iommu_debug_domain_add(struct iommu_domain *domain)
-{
-}
-
static inline void iommu_debug_domain_remove(struct iommu_domain *domain)
{
}