Commit 94a1e869 authored by Mike Travis's avatar Mike Travis Committed by Ingo Molnar

NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var

  * Slight optimization when getting one's own cpu_info percpu data.
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 1bd9d6b6
...@@ -134,7 +134,7 @@ extern __u32 cleared_cpu_caps[NCAPINTS]; ...@@ -134,7 +134,7 @@ extern __u32 cleared_cpu_caps[NCAPINTS];
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info); DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
#define cpu_data(cpu) per_cpu(cpu_info, cpu) #define cpu_data(cpu) per_cpu(cpu_info, cpu)
#define current_cpu_data cpu_data(smp_processor_id()) #define current_cpu_data __get_cpu_var(cpu_info)
#else #else
#define cpu_data(cpu) boot_cpu_data #define cpu_data(cpu) boot_cpu_data
#define current_cpu_data boot_cpu_data #define current_cpu_data boot_cpu_data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment