aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2009-03-08 06:34:19 -0400
committerIngo Molnar <mingo@elte.hu>2009-03-08 11:24:49 -0400
commit184fe4ab1f2e4dfa45584889bb3820031648386b (patch)
tree84dc2864567795669a01f6ce1e786934066b4695 /arch
parent880860e392d92c457e8116cdee39ec4d109174ee (diff)
x86: perf_counter cleanup
Use and actual unsigned long bitmap instead of casting our way around. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Jaswinder Singh Rajput <jaswinder@kernel.org> LKML-Reference: <1236508459.22914.3645.camel@twins> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/cpu/perf_counter.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/perf_counter.c b/arch/x86/kernel/cpu/perf_counter.c
index f5853718d4d3..1df421042b2a 100644
--- a/arch/x86/kernel/cpu/perf_counter.c
+++ b/arch/x86/kernel/cpu/perf_counter.c
@@ -37,7 +37,7 @@ struct cpu_hw_counters {
37 unsigned long used[BITS_TO_LONGS(X86_PMC_IDX_MAX)]; 37 unsigned long used[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
38 unsigned long interrupts; 38 unsigned long interrupts;
39 u64 throttle_ctrl; 39 u64 throttle_ctrl;
40 u64 active_mask; 40 unsigned long active_mask[BITS_TO_LONGS(X86_PMC_IDX_MAX)];
41 int enabled; 41 int enabled;
42}; 42};
43 43
@@ -291,7 +291,7 @@ static void pmc_amd_restore_all(u64 ctrl)
291 return; 291 return;
292 292
293 for (idx = 0; idx < nr_counters_generic; idx++) { 293 for (idx = 0; idx < nr_counters_generic; idx++) {
294 if (test_bit(idx, (unsigned long *)&cpuc->active_mask)) { 294 if (test_bit(idx, cpuc->active_mask)) {
295 u64 val; 295 u64 val;
296 296
297 rdmsrl(MSR_K7_EVNTSEL0 + idx, val); 297 rdmsrl(MSR_K7_EVNTSEL0 + idx, val);
@@ -377,7 +377,7 @@ static void pmc_amd_enable(int idx, u64 config)
377{ 377{
378 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 378 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
379 379
380 set_bit(idx, (unsigned long *)&cpuc->active_mask); 380 set_bit(idx, cpuc->active_mask);
381 if (cpuc->enabled) 381 if (cpuc->enabled)
382 config |= ARCH_PERFMON_EVENTSEL0_ENABLE; 382 config |= ARCH_PERFMON_EVENTSEL0_ENABLE;
383 383
@@ -401,7 +401,7 @@ static void pmc_amd_disable(int idx, u64 config)
401{ 401{
402 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters); 402 struct cpu_hw_counters *cpuc = &__get_cpu_var(cpu_hw_counters);
403 403
404 clear_bit(idx, (unsigned long *)&cpuc->active_mask); 404 clear_bit(idx, cpuc->active_mask);
405 wrmsrl(MSR_K7_EVNTSEL0 + idx, config); 405 wrmsrl(MSR_K7_EVNTSEL0 + idx, config);
406 406
407} 407}