diff options
author | David S. Miller <davem@davemloft.net> | 2010-06-23 11:39:02 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-23 11:39:02 -0700 |
commit | b7d45c3f741b114cdda9ee0cd727afaf60a1bf37 (patch) | |
tree | 2712b7f5ddab5af1fbc67555d880216baefe7227 /arch/sparc/kernel | |
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')
-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) cpuc->current_idx[i] = idx; enc = perf_event_get_enc(cpuc->events[i]); + pcr &= ~mask_for_index(idx); pcr |= event_encoding(enc, idx); } out: |