lkml.org 
[lkml]   [2013]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3/7] iommu: Change iommu driver to call remove_device_to_group trace event
    Date
    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>
    ---
    drivers/iommu/iommu.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
    index 349c92d..278055b 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;
    --
    1.7.10.4


    \
     
     \ /
      Last update: 2013-08-15 20:21    [W:2.383 / U:0.212 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site