[PATCH 2.6.19-rc1-mm1] espfix Use scaling addressing mode rather than shifting in PER_CPU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Use the x86 scaling addressing mode rather than shifting to
multiplying by 4 in PER_CPU().

Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Stas Sergeev <[email protected]>
Cc: Zachary Amsden <[email protected]>
Cc: Chuck Ebbert <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Andi Kleen <[email protected]>

diff -r ea4549dd86a4 include/asm-i386/percpu.h
--- a/include/asm-i386/percpu.h	Tue Oct 10 16:36:02 2006 -0700
+++ b/include/asm-i386/percpu.h	Tue Oct 10 16:37:59 2006 -0700
@@ -19,8 +19,7 @@
#define PER_CPU(var, cpu) \
-	shll $2, cpu; \
-	movl __per_cpu_offset(cpu), cpu; \
+	movl __per_cpu_offset(,cpu,4), cpu;	\
	addl $per_cpu__/**/var, cpu;
#else /* ! SMP */
#define PER_CPU(var, cpu) \

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux