projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d0659c
)
sparc64: Fix maybe_change_configuration() PCR setting.
author
David S. Miller
<davem@davemloft.net>
Wed, 23 Jun 2010 18:39:02 +0000
(11:39 -0700)
committer
David S. Miller
<davem@davemloft.net>
Wed, 23 Jun 2010 18:39:02 +0000
(11:39 -0700)
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>
arch/sparc/kernel/perf_event.c
patch
|
blob
|
history
diff --git
a/arch/sparc/kernel/perf_event.c
b/arch/sparc/kernel/perf_event.c
index 34ce49f80eac53185dfe32b951bb10e91224b4e2..2e1698332b6deca72d2718df3ce12a332dafa908 100644
(file)
--- 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: