diff options
author | Paul Mackerras <paulus@samba.org> | 2009-05-11 01:50:21 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-11 06:10:54 -0400 |
commit | 615a3f1e055ac9b0ae74e1f935a12ea2cfe2a2ad (patch) | |
tree | bc109da69e48f00fad8782ef1852d052e92d1546 /kernel/perf_counter.c | |
parent | a08b159fc243dbfe415250466d24cfc5010deee5 (diff) |
perf_counter: call atomic64_set for counter->count
A compile warning triggered because we are calling
atomic_set(&counter->count). But since counter->count
is an atomic64_t, we have to use atomic64_set.
So the count can be set short, resulting in the reset ioctl
only resetting the low word.
[ Impact: clear counter properly during the reset ioctl ]
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <18951.48285.270311.981806@drongo.ozlabs.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r-- | kernel/perf_counter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index 7373b96bc36c..5ea0240adab2 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
@@ -1281,7 +1281,7 @@ static unsigned int perf_poll(struct file *file, poll_table *wait) | |||
1281 | static void perf_counter_reset(struct perf_counter *counter) | 1281 | static void perf_counter_reset(struct perf_counter *counter) |
1282 | { | 1282 | { |
1283 | (void)perf_counter_read(counter); | 1283 | (void)perf_counter_read(counter); |
1284 | atomic_set(&counter->count, 0); | 1284 | atomic64_set(&counter->count, 0); |
1285 | perf_counter_update_userpage(counter); | 1285 | perf_counter_update_userpage(counter); |
1286 | } | 1286 | } |
1287 | 1287 | ||