mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] perf_counter: Fix atomic_set vs. atomic64_t type mismatch
@ 2009-06-13  7:06 Paul Mackerras
  2009-06-13 14:48 ` [tip:perfcounters/core] " tip-bot for Paul Mackerras
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2009-06-13  7:06 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, linux-kernel

Using atomic_set on an atomic64_t variable gives a compiler warning on
powerpc, and won't give the desired result at runtime.  This fixes an
instance of this error in the perf_counter code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
---
 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 29b685f..8d14a73 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1283,7 +1283,7 @@ static void perf_ctx_adjust_freq(struct perf_counter_context *ctx)
 		if (!interrupts) {
 			perf_disable();
 			counter->pmu->disable(counter);
-			atomic_set(&hwc->period_left, 0);
+			atomic64_set(&hwc->period_left, 0);
 			counter->pmu->enable(counter);
 			perf_enable();
 		}
-- 
1.6.0.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip:perfcounters/core] perf_counter: Fix atomic_set vs. atomic64_t type mismatch
  2009-06-13  7:06 [PATCH] perf_counter: Fix atomic_set vs. atomic64_t type mismatch Paul Mackerras
@ 2009-06-13 14:48 ` tip-bot for Paul Mackerras
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Paul Mackerras @ 2009-06-13 14:48 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, paulus, hpa, mingo, a.p.zijlstra, tglx, mingo

Commit-ID:  87847b8f26cc7176ec9b239898dc7ce47a94e1a6
Gitweb:     http://git.kernel.org/tip/87847b8f26cc7176ec9b239898dc7ce47a94e1a6
Author:     Paul Mackerras <paulus@samba.org>
AuthorDate: Sat, 13 Jun 2009 17:06:50 +1000
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 13 Jun 2009 12:58:24 +0200

perf_counter: Fix atomic_set vs. atomic64_t type mismatch

Using atomic_set on an atomic64_t variable gives a compiler
warning on powerpc, and won't give the desired result at runtime.
This fixes an instance of this error in the perf_counter code.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <18995.20490.979429.244883@cargo.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 29b685f..8d14a73 100644
--- a/kernel/perf_counter.c
+++ b/kernel/perf_counter.c
@@ -1283,7 +1283,7 @@ static void perf_ctx_adjust_freq(struct perf_counter_context *ctx)
 		if (!interrupts) {
 			perf_disable();
 			counter->pmu->disable(counter);
-			atomic_set(&hwc->period_left, 0);
+			atomic64_set(&hwc->period_left, 0);
 			counter->pmu->enable(counter);
 			perf_enable();
 		}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-13 14:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-13  7:06 [PATCH] perf_counter: Fix atomic_set vs. atomic64_t type mismatch Paul Mackerras
2009-06-13 14:48 ` [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