From: Brian Gerst Date: Thu, 9 Sep 2010 16:17:26 +0000 (+0200) Subject: x86, percpu: Optimize this_cpu_ptr X-Git-Tag: v2.6.37-rc1~163^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db7829c6cc32f3c0c9a324118d743acb1abff081;p=pandora-kernel.git x86, percpu: Optimize this_cpu_ptr Allow arches to implement __this_cpu_ptr, and provide an x86 version. Before: movq $foo, %rax movq %gs:this_cpu_off, %rdx addq %rdx, %rax After: movq $foo, %rax addq %gs:this_cpu_off, %rax The benefit is doing it in one less instruction and not clobbering a temporary register. tj: * Beefed up the comment a bit and renamed in-macro temp variable to match neighboring macros. * Folded fix for const pointer case found in linux-next. * Fixed sparse notation. Signed-off-by: Brian Gerst Signed-off-by: Tejun Heo --- Reading git-diff-tree failed