]> git.hungrycats.org Git - linux/commitdiff
perf_event: Fix preempt warning in perf_clock()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 26 Feb 2010 15:36:23 +0000 (16:36 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 16:06:14 +0000 (09:06 -0700)
commit 24691ea964cc0123e386b661e03a86a481c6ee79 upstream.

A recent commit introduced a preemption warning for
perf_clock(), use raw_smp_processor_id() to avoid this, it
really doesn't matter which cpu we use here.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1267198583.22519.684.camel@laptop>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/perf_event.c

index 2ae7409bf38f80cc7cbd5dbd472f614c3d694d37..2fa4301ffadbbb2b9a0aa7b91a6d2d5e118a1630 100644 (file)
@@ -248,7 +248,7 @@ static void perf_unpin_context(struct perf_event_context *ctx)
 
 static inline u64 perf_clock(void)
 {
-       return cpu_clock(smp_processor_id());
+       return cpu_clock(raw_smp_processor_id());
 }
 
 /*