summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/iommu.c
diff options
context:
space:
mode:
authorShuah Khan2013-08-15 19:59:25 +0200
committerJoerg Roedel2013-09-24 12:35:25 +0200
commit2e757086bdfdc9450dc2e4a5d2ec5431520a02c8 (patch)
tree566857901d37dc35ad3a10fdf5b684e4d386abb5 /drivers/iommu/iommu.c
parentiommu: Change iommu driver to call add_device_to_group trace event (diff)
downloadkernel-qcow2-linux-2e757086bdfdc9450dc2e4a5d2ec5431520a02c8.tar.gz
kernel-qcow2-linux-2e757086bdfdc9450dc2e4a5d2ec5431520a02c8.tar.xz
kernel-qcow2-linux-2e757086bdfdc9450dc2e4a5d2ec5431520a02c8.zip
iommu: Change iommu driver to call remove_device_to_group trace event
Change iommu driver to call remove_device_to_group trace event. This iommu_group class event can be enabled to trigger when devices get removed from an iommu group. Trace information includes iommu group id and device name. Testing: Added trace calls to iommu_prepare_identity_map() for testing some of the conditions that are hard to trigger. Here is the trace from the testing: swapper/0-1 [003] .... 1.854101: remove_device_from_group: IOMMU: groupID=0 device=0000:00:02.0 Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r--drivers/iommu/iommu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 349c92dfce05..278055bd0715 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -402,6 +402,8 @@ void iommu_group_remove_device(struct device *dev)
sysfs_remove_link(group->devices_kobj, device->name);
sysfs_remove_link(&dev->kobj, "iommu_group");
+ trace_remove_device_from_group(group->id, dev);
+
kfree(device->name);
kfree(device);
dev->iommu_group = NULL;