perf_event: Fix preempt warning in perf_clock()
authorPeter Zijlstra <peterz@infradead.org>
Fri, 26 Feb 2010 15:36:23 +0000 (16:36 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 26 Feb 2010 16:25:00 +0000 (17:25 +0100)
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>
Cc: <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c

index 05b6c6b825e35cae3e9e03c1e8582e56dda174e1..aa6155b5e24c15d50f747293152d323dddb1c65d 100644 (file)
@@ -249,7 +249,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());
 }
 
 /*