diff options
author | Robert Richter <robert.richter@amd.com> | 2012-05-18 06:40:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-01 03:12:54 -0400 |
commit | 888cc3675baa8b5eb672b53d1c2e346fe2164bee (patch) | |
tree | 71f6fceec688ab7d23c1172cc96a2e5136580cf9 | |
parent | 512a8016c25d2045630b8933e7882169f7a98751 (diff) |
perf/x86: Update event scheduling constraints for AMD family 15h models
commit 5bcdf5e4fee3c45e1281c25e4941f2163cb28c65 upstream.
This update is for newer family 15h cpu models from 0x02 to 0x1f.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1337337642-1621-1-git-send-email-robert.richter@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_amd.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_amd.c b/arch/x86/kernel/cpu/perf_event_amd.c index fe29c1d2219..4b50c965f0e 100644 --- a/arch/x86/kernel/cpu/perf_event_amd.c +++ b/arch/x86/kernel/cpu/perf_event_amd.c | |||
@@ -437,6 +437,7 @@ static __initconst const struct x86_pmu amd_pmu = { | |||
437 | * 0x023 DE PERF_CTL[2:0] | 437 | * 0x023 DE PERF_CTL[2:0] |
438 | * 0x02D LS PERF_CTL[3] | 438 | * 0x02D LS PERF_CTL[3] |
439 | * 0x02E LS PERF_CTL[3,0] | 439 | * 0x02E LS PERF_CTL[3,0] |
440 | * 0x031 LS PERF_CTL[2:0] (**) | ||
440 | * 0x043 CU PERF_CTL[2:0] | 441 | * 0x043 CU PERF_CTL[2:0] |
441 | * 0x045 CU PERF_CTL[2:0] | 442 | * 0x045 CU PERF_CTL[2:0] |
442 | * 0x046 CU PERF_CTL[2:0] | 443 | * 0x046 CU PERF_CTL[2:0] |
@@ -450,10 +451,12 @@ static __initconst const struct x86_pmu amd_pmu = { | |||
450 | * 0x0DD LS PERF_CTL[5:0] | 451 | * 0x0DD LS PERF_CTL[5:0] |
451 | * 0x0DE LS PERF_CTL[5:0] | 452 | * 0x0DE LS PERF_CTL[5:0] |
452 | * 0x0DF LS PERF_CTL[5:0] | 453 | * 0x0DF LS PERF_CTL[5:0] |
454 | * 0x1C0 EX PERF_CTL[5:3] | ||
453 | * 0x1D6 EX PERF_CTL[5:0] | 455 | * 0x1D6 EX PERF_CTL[5:0] |
454 | * 0x1D8 EX PERF_CTL[5:0] | 456 | * 0x1D8 EX PERF_CTL[5:0] |
455 | * | 457 | * |
456 | * (*) depending on the umask all FPU counters may be used | 458 | * (*) depending on the umask all FPU counters may be used |
459 | * (**) only one unitmask enabled at a time | ||
457 | */ | 460 | */ |
458 | 461 | ||
459 | static struct event_constraint amd_f15_PMC0 = EVENT_CONSTRAINT(0, 0x01, 0); | 462 | static struct event_constraint amd_f15_PMC0 = EVENT_CONSTRAINT(0, 0x01, 0); |
@@ -503,6 +506,12 @@ amd_get_event_constraints_f15h(struct cpu_hw_events *cpuc, struct perf_event *ev | |||
503 | return &amd_f15_PMC3; | 506 | return &amd_f15_PMC3; |
504 | case 0x02E: | 507 | case 0x02E: |
505 | return &amd_f15_PMC30; | 508 | return &amd_f15_PMC30; |
509 | case 0x031: | ||
510 | if (hweight_long(hwc->config & ARCH_PERFMON_EVENTSEL_UMASK) <= 1) | ||
511 | return &amd_f15_PMC20; | ||
512 | return &emptyconstraint; | ||
513 | case 0x1C0: | ||
514 | return &amd_f15_PMC53; | ||
506 | default: | 515 | default: |
507 | return &amd_f15_PMC50; | 516 | return &amd_f15_PMC50; |
508 | } | 517 | } |