lkml.org 
[lkml]   [2008]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 5/8] NR_CPUS: Replace per_cpu(..., smp_processor_id()) with __get_cpu_var
  * Slight optimization when getting one's own cpu_info percpu data.

Applies to both tip/master and linux-next.

Signed-off-by: Mike Travis <travis@sgi.com>
---
include/asm-x86/processor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.tip.orig/include/asm-x86/processor.h
+++ linux-2.6.tip/include/asm-x86/processor.h
@@ -135,7 +135,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
--


\
 
 \ /
  Last update: 2008-07-19 03:15    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site