mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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>
This commit is contained in:
parent
0d0659c78d
commit
b7d45c3f74
1 changed files with 1 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue