projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bd9d6b
)
NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var
author
Mike Travis
<travis@sgi.com>
Sat, 19 Jul 2008 01:11:31 +0000
(18:11 -0700)
committer
Ingo Molnar
<mingo@elte.hu>
Sun, 20 Jul 2008 08:21:11 +0000
(10:21 +0200)
* Slight optimization when getting one's own cpu_info percpu data.
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/asm-x86/processor.h
patch
|
blob
|
blame
|
history
diff --git
a/include/asm-x86/processor.h
b/include/asm-x86/processor.h
index 55402d2ab9380e3f621c889503af1cec0abd9851..f92315ed68e1e61ed35b05349fb005c12d21e5f7 100644
(file)
--- a/
include/asm-x86/processor.h
+++ b/
include/asm-x86/processor.h
@@
-134,7
+134,7
@@
extern __u32 cleared_cpu_caps[NCAPINTS];
#ifdef CONFIG_SMP
DECLARE_PER_CPU(struct cpuinfo_x86, cpu_info);
#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
#define cpu_data(cpu) boot_cpu_data
#define current_cpu_data boot_cpu_data