lkml.org 
[lkml]   [2013]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] IOMMU/AMD: Adding IOMMU PC resource management
On 5/14/2013 2:09 AM, Peter Zijlstra wrote:
> On Mon, May 13, 2013 at 04:43:44PM -0500, steven.kinney@amd.com wrote:
>> +static void init_iommu_perf_ctr(struct amd_iommu *iommu)
>> +{
>> + u32 val = 0xabcd, val2 = 0;
>> +
>> + if (!iommu_feature(iommu, FEATURE_PC))
>> + return;
>> +
>> + amd_iommu_pc_present = true;
>> +
>> + /* Check if the performance counters can be written to */
>> + if ((0 != amd_iommu_pc_get_set_reg_val(0, 0, 0, 0, &val, true)) ||
>> + (0 != amd_iommu_pc_get_set_reg_val(0, 0, 0, 0, &val2, false)) ||
>> + (val != val2)) {
>> + pr_err("AMD-Vi: Unable to write to IOMMU perf counter.\n");
> Would it make sense to clear amd_iommu_pc_present here?
Yes, I'll take care of this here.

Thank you,

Surave



\
 
 \ /
  Last update: 2013-05-14 17:01    [W:0.184 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site