Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147240
b: refs/heads/master
c: b5e8acf
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Mar 5, 2009
1 parent 5ddbb32 commit 21c221f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 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: b0f3f28e0f14eb335f67bfaae33ce8b8d74fd58b
refs/heads/master: b5e8acf66ff5db707c7e08df49fdf6b415878442
16 changes: 2 additions & 14 deletions trunk/arch/x86/kernel/cpu/perf_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,20 +959,8 @@ static struct pmc_x86_ops *pmc_amd_init(void)

nr_counters_generic = 4;
nr_counters_fixed = 0;
counter_value_mask = ~0ULL;

rdmsrl(MSR_K7_PERFCTR0, old);
wrmsrl(MSR_K7_PERFCTR0, counter_value_mask);
/*
* read the truncated mask
*/
rdmsrl(MSR_K7_PERFCTR0, counter_value_mask);
wrmsrl(MSR_K7_PERFCTR0, old);

bits = 32 + fls(counter_value_mask >> 32);
if (bits == 32)
bits = fls((u32)counter_value_mask);
counter_value_bits = bits;
counter_value_mask = 0x0000FFFFFFFFFFFFULL;
counter_value_bits = 48;

pr_info("AMD Performance Monitoring support detected.\n");

Expand Down

0 comments on commit 21c221f

Please sign in to comment.