提交 de34787f 编写于 作者: M Madhavan Srinivasan 提交者: Michael Ellerman

powerpc/perf: Fix pmu_count to count only nest imc pmus

"pmu_count" in opal_imc_counters_probe() is intended to hold
the number of successful nest imc pmu registerations. But
current code also counts other imc units like core_imc and
thread_imc. Patch add a check to count only nest imc pmus.
Signed-off-by: NMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 252eb558
...@@ -191,9 +191,11 @@ static int opal_imc_counters_probe(struct platform_device *pdev) ...@@ -191,9 +191,11 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
break; break;
} }
if (!imc_pmu_create(imc_dev, pmu_count, domain)) if (!imc_pmu_create(imc_dev, pmu_count, domain)) {
if (domain == IMC_DOMAIN_NEST)
pmu_count++; pmu_count++;
} }
}
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册