All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] powerpc/perf: Fix pmu_count to count only nest imc pmus
@ 2017-11-22  5:15 Madhavan Srinivasan
  2017-11-22  5:15 ` [PATCH v2 2/2] powerpc/perf: Fix IMC_MAX_PMU macro Madhavan Srinivasan
  2017-11-24  9:46 ` [1/2] powerpc/perf: Fix pmu_count to count only nest imc pmus Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Madhavan Srinivasan @ 2017-11-22  5:15 UTC (permalink / raw)
  To: mpe; +Cc: linuxppc-dev, anju, Madhavan Srinivasan

"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>
---
 arch/powerpc/platforms/powernv/opal-imc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c
index 21f6531fae20..b150f4deaccf 100644
--- a/arch/powerpc/platforms/powernv/opal-imc.c
+++ b/arch/powerpc/platforms/powernv/opal-imc.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH 1/2] powerpc/perf: Fix pmu_count to count only nest imc pmus
@ 2017-11-10 20:39 Madhavan Srinivasan
  0 siblings, 0 replies; 5+ messages in thread
From: Madhavan Srinivasan @ 2017-11-10 20:39 UTC (permalink / raw)
  To: mpe; +Cc: linuxppc-dev, Madhavan Srinivasan

"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>
---
 arch/powerpc/platforms/powernv/opal-imc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal-imc.c
index 21f6531fae20..b150f4deaccf 100644
--- a/arch/powerpc/platforms/powernv/opal-imc.c
+++ b/arch/powerpc/platforms/powernv/opal-imc.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-24  9:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-22  5:15 [PATCH 1/2] powerpc/perf: Fix pmu_count to count only nest imc pmus Madhavan Srinivasan
2017-11-22  5:15 ` [PATCH v2 2/2] powerpc/perf: Fix IMC_MAX_PMU macro Madhavan Srinivasan
2017-11-24  9:46   ` [v2,2/2] " Michael Ellerman
2017-11-24  9:46 ` [1/2] powerpc/perf: Fix pmu_count to count only nest imc pmus Michael Ellerman
  -- strict thread matches above, loose matches on Subject: below --
2017-11-10 20:39 [PATCH 1/2] " Madhavan Srinivasan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.