diff options
author | Yong Wang <[email protected]> | 2009-06-24 10:13:24 +0800 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2009-06-24 10:51:24 +0200 |
commit | c14dab5c0782ef632742963a66276a195418a63c (patch) | |
tree | 441e3da9c7346f010b129a8826d21323b7d41d0e /net/lapb/lapb_timer.c | |
parent | f7679dabfaf69840b000d238a020cee7157aca17 (diff) |
perf_counter, x86: Set global control MSR correctly
Previous code made an assumption that the power on value of global
control MSR has enabled all fixed and general purpose counters properly.
However, this is not the case for certain Intel processors, such as
Atom - and it might also be firmware dependent.
Each enable bit in IA32_PERF_GLOBAL_CTRL is AND'ed with the
enable bits for all privilege levels in the respective IA32_PERFEVTSELx
or IA32_PERF_FIXED_CTR_CTRL MSRs to start/stop the counting of
respective counters. Counting is enabled if the AND'ed results is true;
counting is disabled when the result is false.
The end result is that all fixed counters are always disabled on Atom
processors because the assumption is just invalid.
Fix this by not initializing the ctrl-mask out of the global MSR,
but setting it to perf_counter_mask.
Reported-by: Stephane Eranian <[email protected]>
Signed-off-by: Yong Wang <[email protected]>
Cc: Arjan van de Ven <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions