Skip to content

Commit

Permalink
[S390] nohz: optimize arch_needs_cpu()
Browse files Browse the repository at this point in the history
arch_needs_cpu() gets always executed on the current cpu. Therefore
the cpu parameter can be ignored it is possible to use __get_cpu_var()
instead of per_cpu() to access the per_cpu variable, which will
generate better code.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Jan 5, 2011
1 parent 90adac5 commit 37e8952
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/s390/include/asm/cputime.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static inline void s390_idle_check(struct pt_regs *regs, __u64 int_clock,

static inline int s390_nohz_delay(int cpu)
{
return per_cpu(s390_idle, cpu).nohz_delay != 0;
return __get_cpu_var(s390_idle).nohz_delay != 0;
}

#define arch_needs_cpu(cpu) s390_nohz_delay(cpu)
Expand Down

0 comments on commit 37e8952

Please sign in to comment.