Skip to content

perf, x86: perf, x86: Add support for AMD family 15h core counters

Robert Richter lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5perf, x86: Use helper function in x86_pmu_enable_all()arch/x86/kernel/cpu/perf_event.c+8 -111 reply
2/5perf, x86: Calculate perfctr msr addresses in helper functionsarch/x86/kernel/cpu/perf_event.c arch/x86/kernel/cpu/perf_event_intel.c+25 -151 reply
3/5perf, x86: Add new AMD family 15h msrs to perfctr reservation codearch/x86/kernel/cpu/perfctr-watchdog.c+4 -01 reply
4/5perf, x86: Store perfctr msr addresses in config_base/event_basearch/x86/kernel/cpu/perf_event.c arch/x86/kernel/cpu/perf_event_p4.c arch/x86/kernel/cpu/perf_event_p6.c+15 -201 reply
5/5perf, x86: Add support for AMD family 15h core countersarch/x86/kernel/cpu/perf_event.c arch/x86/kernel/cpu/perf_event_amd.c+198 -39 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] perf, x86: perf, x86: Add support for AMD family 15h core counters

This patch set adds support for AMD family 15h core counters. Major changes compared to family 10h counters are:

* Now there are separate northbridge and core counters that resides in different MSR ranges (core: MSRC001_02[0B:00], nb:
MSRC001_02[47:40]).

* The MSR addresses of perfctr and evntsel registers are now located side-by-side, we can not calculate the address with (base + index) anymore.

* There are 4 northbridge counters and 6 core counters.

* There are legacy aliases to old MSR counter addresses (MSRC001_00[03:00] -> MSRC001_02[07:00] respectively).

* There are restrictions now that not all performance monitor events can be counted on all counters.

We need to change MSR address handling of the x86 perf_event implementation and also add more AMD event constraints to schedule events.

This patch set only adds core counters.

-Robert