lkml.org 
[lkml]   [2018]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU
From
Date
On 04/17/2018 12:38 PM, Hook, Gary wrote:
> On 4/13/2018 8:08 PM, Mehta, Sohil wrote:
>> On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote:
>>> +
>>> +
>>> +    mutex_lock(&amd_iommu_debugfs_lock);
>>> +    if (!amd_iommu_debugfs) {
>>> +        d_top = iommu_debugfs_setup();
>>> +        if (d_top)
>>> +            amd_iommu_debugfs =
>>> debugfs_create_dir("amd", d_top);
>>> +    }
>>> +    mutex_unlock(&amd_iommu_debugfs_lock);
>>
>>
>> You can do the above only once if you iterate over the IOMMUs here
>>   instead of doing it in amd_iommu_init.
>
> I'm not sure it matters, given the finite number of IOMMUs in a system,
> and the fact that this work is done exactly once. However, removal of a
> lock is fine thing, so I'll move this around.

After thinking about this, and looking at the code, I've decided to
leave this alone.

v4 is on its way.


\
 
 \ /
  Last update: 2018-04-30 21:59    [W:0.085 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site