diff options
author | David S. Miller <davem@davemloft.net> | 2010-06-23 14:39:02 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-23 14:39:02 -0400 |
commit | b7d45c3f741b114cdda9ee0cd727afaf60a1bf37 (patch) | |
tree | 2712b7f5ddab5af1fbc67555d880216baefe7227 /arch/sparc/kernel/perf_event.c | |
parent | 0d0659c78d7ea29ad6c3c538dcaae0227f31b9d2 (diff) |
sparc64: Fix maybe_change_configuration() PCR setting.
Need to mask out the existing event bits before OR'ing in
the new ones.
Noticed by Peter Zijlstra.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/perf_event.c')
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 34ce49f80eac..2e1698332b6d 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -655,6 +655,7 @@ static u64 maybe_change_configuration(struct cpu_hw_events *cpuc, u64 pcr) | |||
655 | cpuc->current_idx[i] = idx; | 655 | cpuc->current_idx[i] = idx; |
656 | 656 | ||
657 | enc = perf_event_get_enc(cpuc->events[i]); | 657 | enc = perf_event_get_enc(cpuc->events[i]); |
658 | pcr &= ~mask_for_index(idx); | ||
658 | pcr |= event_encoding(enc, idx); | 659 | pcr |= event_encoding(enc, idx); |
659 | } | 660 | } |
660 | out: | 661 | out: |