Commit 86aa94c
perf/x86/intel: Fix incorrect MSR index calculations in intel_pmu_config_acr()
The MSR offset calculations in intel_pmu_config_acr() are buggy.
To calculate fixed counter MSR addresses in intel_pmu_config_acr(),
the HW counter index "idx" is subtracted by INTEL_PMC_IDX_FIXED.
This leads to the ACR mask value of fixed counters to be incorrectly
saved to the positions of GP counters in acr_cfg_b[], e.g.
For fixed counter 0, its ACR counter mask should be saved to
acr_cfg_b[32], but it's saved to acr_cfg_b[0] incorrectly.
Fix this issue.
[ mingo: Clarified & improved the changelog. ]
Fixes: ec980e4 ("perf/x86/intel: Support auto counter reload")
Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250529080236.2552247-2-dapeng1.mi@linux.intel.com1 parent dd3922c commit 86aa94c
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2900 | 2900 | | |
2901 | 2901 | | |
2902 | 2902 | | |
| 2903 | + | |
2903 | 2904 | | |
2904 | 2905 | | |
2905 | 2906 | | |
2906 | 2907 | | |
2907 | 2908 | | |
2908 | 2909 | | |
2909 | 2910 | | |
| 2911 | + | |
2910 | 2912 | | |
2911 | 2913 | | |
2912 | 2914 | | |
2913 | | - | |
| 2915 | + | |
2914 | 2916 | | |
2915 | 2917 | | |
2916 | 2918 | | |
2917 | | - | |
| 2919 | + | |
2918 | 2920 | | |
2919 | 2921 | | |
2920 | 2922 | | |
2921 | 2923 | | |
2922 | | - | |
| 2924 | + | |
2923 | 2925 | | |
2924 | 2926 | | |
2925 | 2927 | | |
| |||
0 commit comments