Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191113
b: refs/heads/master
c: d6dc0b4
h: refs/heads/master
i:
  191111: a73d98a
v: v3
  • Loading branch information
Robert Richter authored and Ingo Molnar committed Mar 17, 2010
1 parent 3af817c commit 75394fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 10f1014d86fd4fe5087080d609b51183396c5e4c
refs/heads/master: d6dc0b4ead6e8720096ecfa3d9e899b47ddbc8ed
9 changes: 3 additions & 6 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
return len;
}

static u64 perf_event_mask __read_mostly;

struct event_constraint {
union {
unsigned long idxmsk[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
Expand Down Expand Up @@ -1406,7 +1404,7 @@ void __init init_hw_perf_events(void)
x86_pmu.num_events, X86_PMC_MAX_GENERIC);
x86_pmu.num_events = X86_PMC_MAX_GENERIC;
}
perf_event_mask = (1 << x86_pmu.num_events) - 1;
x86_pmu.intel_ctrl = (1 << x86_pmu.num_events) - 1;
perf_max_events = x86_pmu.num_events;

if (x86_pmu.num_events_fixed > X86_PMC_MAX_FIXED) {
Expand All @@ -1415,9 +1413,8 @@ void __init init_hw_perf_events(void)
x86_pmu.num_events_fixed = X86_PMC_MAX_FIXED;
}

perf_event_mask |=
x86_pmu.intel_ctrl |=
((1LL << x86_pmu.num_events_fixed)-1) << X86_PMC_IDX_FIXED;
x86_pmu.intel_ctrl = perf_event_mask;

perf_events_lapic_init();
register_die_notifier(&perf_event_nmi_notifier);
Expand All @@ -1442,7 +1439,7 @@ void __init init_hw_perf_events(void)
pr_info("... value mask: %016Lx\n", x86_pmu.event_mask);
pr_info("... max period: %016Lx\n", x86_pmu.max_period);
pr_info("... fixed-purpose events: %d\n", x86_pmu.num_events_fixed);
pr_info("... event mask: %016Lx\n", perf_event_mask);
pr_info("... event mask: %016Lx\n", x86_pmu.intel_ctrl);

perf_cpu_notifier(x86_pmu_notifier);
}
Expand Down

0 comments on commit 75394fc

Please sign in to comment.