Skip to content

Commit

Permalink
timers: Use this_cpu_read
Browse files Browse the repository at this point in the history
Eric asked for this.

[tglx: Because it generates faster code according to Erics ]

Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-mm@kvack.org
LKML-Reference: <alpine.DEB.2.00.1011301404490.4039@router.home>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Christoph Lameter authored and Thomas Gleixner committed Dec 12, 2010
1 parent 45f7426 commit 7496351
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ static unsigned long cmp_next_hrtimer_event(unsigned long now,
*/
unsigned long get_next_timer_interrupt(unsigned long now)
{
struct tvec_base *base = __get_cpu_var(tvec_bases);
struct tvec_base *base = __this_cpu_read(tvec_bases);
unsigned long expires;

spin_lock(&base->lock);
Expand Down Expand Up @@ -1267,7 +1267,7 @@ void update_process_times(int user_tick)
*/
static void run_timer_softirq(struct softirq_action *h)
{
struct tvec_base *base = __get_cpu_var(tvec_bases);
struct tvec_base *base = __this_cpu_read(tvec_bases);

hrtimer_run_pending();

Expand Down

0 comments on commit 7496351

Please sign in to comment.