drivers/perf: apple_m1: add known PMU events
authorYangyu Chen <cyy@cyyself.name>
Wed, 7 Aug 2024 02:35:18 +0000 (11:35 +0900)
committerWill Deacon <will@kernel.org>
Fri, 23 Aug 2024 14:52:48 +0000 (15:52 +0100)
commit3cce331ee2a4cc99328757a9bd297ad9a39609e8
treefab0b32e7c4fc0d008ce184f6daf4df74639c59d
parentd8226d8cfbaf5eb9771af8ad8b4e58697e2ffb74
drivers/perf: apple_m1: add known PMU events

This patch adds known PMU events that can be found on /usr/share/kpep in
macOS. The m1_pmu_events and m1_pmu_event_affinity are generated from
the script [1], which consumes the plist file from Apple. And then added
these events to m1_pmu_perf_map and m1_pmu_event_attrs with Apple's
documentation [2].

Link: https://github.com/cyyself/m1-pmu-gen
Link: https://developer.apple.com/download/apple-silicon-cpu-optimization-guide/
Signed-off-by: Yangyu Chen <cyy@cyyself.name>
Acked-by: Hector Martin <marcan@marcan.st>
Link: https://lore.kernel.org/r/tencent_C5DA658E64B8D13125210C8D707CD8823F08@qq.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/apple_m1_cpu_pmu.c