mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 18:14:22 -04:00
powerpc/perf: Fix pmu_count to count only nest imc pmus
[ Upstream commit de34787f10 ]
"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: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
394d0c93b9
commit
86d1d015fe
@@ -191,8 +191,10 @@ static int opal_imc_counters_probe(struct platform_device *pdev)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!imc_pmu_create(imc_dev, pmu_count, domain))
|
||||
pmu_count++;
|
||||
if (!imc_pmu_create(imc_dev, pmu_count, domain)) {
|
||||
if (domain == IMC_DOMAIN_NEST)
|
||||
pmu_count++;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user