* [PATCH] perf_counter: call atomic64_set for counter->count
@ 2009-05-11 5:50 Paul Mackerras
2009-05-11 10:12 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2009-05-11 5:50 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Peter Zijlstra, linux-kernel, Corey Ashford, Thomas Gleixner
This fixes a compile warning where we are calling
atomic_set(&counter->count). Since counter->count is an atomic64_t,
we have to use atomic64_set.
[ Impact: fix type mismatch bug ]
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
index 7373b96..5ea0240 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)
static void perf_counter_reset(struct perf_counter *counter)
{
(void)perf_counter_read(counter);
- atomic_set(&counter->count, 0);
+ atomic64_set(&counter->count, 0);
perf_counter_update_userpage(counter);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [tip:perfcounters/core] perf_counter: call atomic64_set for counter->count
2009-05-11 5:50 [PATCH] perf_counter: call atomic64_set for counter->count Paul Mackerras
@ 2009-05-11 10:12 ` tip-bot for Paul Mackerras
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Paul Mackerras @ 2009-05-11 10:12 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, tglx, cjashfor, mingo
Commit-ID: 615a3f1e055ac9b0ae74e1f935a12ea2cfe2a2ad
Gitweb: http://git.kernel.org/tip/615a3f1e055ac9b0ae74e1f935a12ea2cfe2a2ad
Author: Paul Mackerras <paulus@samba.org>
AuthorDate: Mon, 11 May 2009 15:50:21 +1000
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 11 May 2009 12:10:54 +0200
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>
---
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 7373b96..5ea0240 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)
static void perf_counter_reset(struct perf_counter *counter)
{
(void)perf_counter_read(counter);
- atomic_set(&counter->count, 0);
+ atomic64_set(&counter->count, 0);
perf_counter_update_userpage(counter);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-11 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-11 5:50 [PATCH] perf_counter: call atomic64_set for counter->count Paul Mackerras
2009-05-11 10:12 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome