diff options
author | Robert Richter <robert.richter@amd.com> | 2010-03-17 07:49:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-17 08:06:59 -0400 |
commit | d6dc0b4ead6e8720096ecfa3d9e899b47ddbc8ed (patch) | |
tree | 6f8e410da900ab6fdfd33e0eac4fd2a51ae089f8 /arch/x86 | |
parent | 10f1014d86fd4fe5087080d609b51183396c5e4c (diff) |
perf/core, x86: Remove duplicate perf_event_mask variable
The same information is stored also in x86_pmu.intel_ctrl. This
patch removes perf_event_mask and instead uses
x86_pmu.intel_ctrl directly.
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1268826553-19518-5-git-send-email-robert.richter@amd.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 104292a58c2b..c97d5b52d12a 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -75,8 +75,6 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n) | |||
75 | return len; | 75 | return len; |
76 | } | 76 | } |
77 | 77 | ||
78 | static u64 perf_event_mask __read_mostly; | ||
79 | |||
80 | struct event_constraint { | 78 | struct event_constraint { |
81 | union { | 79 | union { |
82 | unsigned long idxmsk[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; | 80 | unsigned long idxmsk[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; |
@@ -1406,7 +1404,7 @@ void __init init_hw_perf_events(void) | |||
1406 | x86_pmu.num_events, X86_PMC_MAX_GENERIC); | 1404 | x86_pmu.num_events, X86_PMC_MAX_GENERIC); |
1407 | x86_pmu.num_events = X86_PMC_MAX_GENERIC; | 1405 | x86_pmu.num_events = X86_PMC_MAX_GENERIC; |
1408 | } | 1406 | } |
1409 | perf_event_mask = (1 << x86_pmu.num_events) - 1; | 1407 | x86_pmu.intel_ctrl = (1 << x86_pmu.num_events) - 1; |
1410 | perf_max_events = x86_pmu.num_events; | 1408 | perf_max_events = x86_pmu.num_events; |
1411 | 1409 | ||
1412 | if (x86_pmu.num_events_fixed > X86_PMC_MAX_FIXED) { | 1410 | if (x86_pmu.num_events_fixed > X86_PMC_MAX_FIXED) { |
@@ -1415,9 +1413,8 @@ void __init init_hw_perf_events(void) | |||
1415 | x86_pmu.num_events_fixed = X86_PMC_MAX_FIXED; | 1413 | x86_pmu.num_events_fixed = X86_PMC_MAX_FIXED; |
1416 | } | 1414 | } |
1417 | 1415 | ||
1418 | perf_event_mask |= | 1416 | x86_pmu.intel_ctrl |= |
1419 | ((1LL << x86_pmu.num_events_fixed)-1) << X86_PMC_IDX_FIXED; | 1417 | ((1LL << x86_pmu.num_events_fixed)-1) << X86_PMC_IDX_FIXED; |
1420 | x86_pmu.intel_ctrl = perf_event_mask; | ||
1421 | 1418 | ||
1422 | perf_events_lapic_init(); | 1419 | perf_events_lapic_init(); |
1423 | register_die_notifier(&perf_event_nmi_notifier); | 1420 | register_die_notifier(&perf_event_nmi_notifier); |
@@ -1442,7 +1439,7 @@ void __init init_hw_perf_events(void) | |||
1442 | pr_info("... value mask: %016Lx\n", x86_pmu.event_mask); | 1439 | pr_info("... value mask: %016Lx\n", x86_pmu.event_mask); |
1443 | pr_info("... max period: %016Lx\n", x86_pmu.max_period); | 1440 | pr_info("... max period: %016Lx\n", x86_pmu.max_period); |
1444 | pr_info("... fixed-purpose events: %d\n", x86_pmu.num_events_fixed); | 1441 | pr_info("... fixed-purpose events: %d\n", x86_pmu.num_events_fixed); |
1445 | pr_info("... event mask: %016Lx\n", perf_event_mask); | 1442 | pr_info("... event mask: %016Lx\n", x86_pmu.intel_ctrl); |
1446 | 1443 | ||
1447 | perf_cpu_notifier(x86_pmu_notifier); | 1444 | perf_cpu_notifier(x86_pmu_notifier); |
1448 | } | 1445 | } |