Commit d1cf7e822746b5e755f5a893ffeced1f6311c0cf
Committed by
Joerg Roedel
1 parent
7f6db17172
Exists in
master
and in
16 other branches
iommu: Change iommu driver to call add_device_to_group trace event
Change iommu driver to call add_device_to_group trace event. This iommu_group class event can be enabled to trigger when devices get added to an iommu group. Trace information includes iommu group id and device name. Testing: The following is trace is generated when intel-iommu driver adds devices to to iommu groups during boot-time during its initialization: swapper/0-1 [003] .... 1.854793: add_device_to_group: IOMMU: groupID=0 device=0000:00:00.0 swapper/0-1 [003] .... 1.854797: add_device_to_group: IOMMU: groupID=1 device=0000:00:02.0 Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
drivers/iommu/iommu.c
... | ... | @@ -364,6 +364,8 @@ |
364 | 364 | /* Notify any listeners about change to group. */ |
365 | 365 | blocking_notifier_call_chain(&group->notifier, |
366 | 366 | IOMMU_GROUP_NOTIFY_ADD_DEVICE, dev); |
367 | + | |
368 | + trace_add_device_to_group(group->id, dev); | |
367 | 369 | return 0; |
368 | 370 | } |
369 | 371 | EXPORT_SYMBOL_GPL(iommu_group_add_device); |