From: Peter Zijlstra Date: Fri, 26 Feb 2010 15:36:23 +0000 (+0100) Subject: perf_event: Fix preempt warning in perf_clock() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24691ea964cc0123e386b661e03a86a481c6ee79;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git perf_event: Fix preempt warning in perf_clock() 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 LKML-Reference: <1267198583.22519.684.camel@laptop> Cc: Signed-off-by: Ingo Molnar --- diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 05b6c6b825e3..aa6155b5e24c 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -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()); } /*