Skip to content

Commit

Permalink
perf_event: Fix preempt warning in perf_clock()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Feb 26, 2010
1 parent 4385d58 commit 24691ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

/*
Expand Down

0 comments on commit 24691ea

Please sign in to comment.