linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] drivers/perf: apple_m1: fix affinity table for event 0x96 and 0x9b
@ 2024-06-20  3:04 Yangyu Chen
  2024-07-01 14:01 ` Will Deacon
  0 siblings, 1 reply; 10+ messages in thread
From: Yangyu Chen @ 2024-06-20  3:04 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marc Zyngier, Will Deacon, Mark Rutland, Janne Grunau,
	Hector Martin, Asahi Lina, asahi, linux-kernel, Yangyu Chen

Events 0x96 and 0x9b can be installed on counter 7 only. Fix this to avoid
getting the wrong counter value.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
---
 drivers/perf/apple_m1_cpu_pmu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/perf/apple_m1_cpu_pmu.c b/drivers/perf/apple_m1_cpu_pmu.c
index f322e5ca1114..b8127e5428e1 100644
--- a/drivers/perf/apple_m1_cpu_pmu.c
+++ b/drivers/perf/apple_m1_cpu_pmu.c
@@ -107,12 +107,12 @@ static const u16 m1_pmu_event_affinity[M1_PMU_PERFCTR_LAST + 1] = {
 	[M1_PMU_PERFCTR_UNKNOWN_93]	= ONLY_5_6_7,
 	[M1_PMU_PERFCTR_UNKNOWN_94]	= ONLY_5_6_7,
 	[M1_PMU_PERFCTR_UNKNOWN_95]	= ONLY_5_6_7,
-	[M1_PMU_PERFCTR_UNKNOWN_96]	= ONLY_5_6_7,
+	[M1_PMU_PERFCTR_UNKNOWN_96]	= BIT(7),
 	[M1_PMU_PERFCTR_UNKNOWN_97]	= BIT(7),
 	[M1_PMU_PERFCTR_UNKNOWN_98]	= ONLY_5_6_7,
 	[M1_PMU_PERFCTR_UNKNOWN_99]	= ONLY_5_6_7,
 	[M1_PMU_PERFCTR_UNKNOWN_9a]	= BIT(7),
-	[M1_PMU_PERFCTR_UNKNOWN_9b]	= ONLY_5_6_7,
+	[M1_PMU_PERFCTR_UNKNOWN_9b]	= BIT(7),
 	[M1_PMU_PERFCTR_UNKNOWN_9c]	= ONLY_5_6_7,
 	[M1_PMU_PERFCTR_UNKNOWN_9f]	= BIT(7),
 	[M1_PMU_PERFCTR_UNKNOWN_bf]	= ONLY_5_6_7,
-- 
2.45.1



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

end of thread, other threads:[~2024-07-23 16:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-20  3:04 [PATCH v1] drivers/perf: apple_m1: fix affinity table for event 0x96 and 0x9b Yangyu Chen
2024-07-01 14:01 ` Will Deacon
2024-07-01 14:19   ` Marc Zyngier
2024-07-01 14:43     ` Marc Zyngier
2024-07-02 10:22       ` Yangyu Chen
2024-07-02 10:58         ` Marc Zyngier
2024-07-02 12:13           ` Will Deacon
2024-07-02 12:43             ` Yangyu Chen
2024-07-08 12:00               ` Will Deacon
2024-07-23 16:24                 ` Hector Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).