kernel-ark/kernel
Paul Mackerras bfe5d83419 [PATCH] Define __raw_get_cpu_var and use it
There are several instances of per_cpu(foo, raw_smp_processor_id()), which
is semantically equivalent to __get_cpu_var(foo) but without the warning
that smp_processor_id() can give if CONFIG_DEBUG_PREEMPT is enabled.  For
those architectures with optimized per-cpu implementations, namely ia64,
powerpc, s390, sparc64 and x86_64, per_cpu() turns into more and slower
code than __get_cpu_var(), so it would be preferable to use __get_cpu_var
on those platforms.

This defines a __raw_get_cpu_var(x) macro which turns into per_cpu(x,
raw_smp_processor_id()) on architectures that use the generic per-cpu
implementation, and turns into __get_cpu_var(x) on the architectures that
have an optimized per-cpu implementation.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-25 10:01:01 -07:00
..
irq [PATCH] adjust handle_IRR_event() return type 2006-06-23 07:43:08 -07:00
power Add some basic resume trace facilities 2006-06-24 14:44:01 -07:00
.gitignore
acct.c
audit.c
audit.h
auditfilter.c
auditsc.c [PATCH] Doc: add audit & acct to DocBook 2006-06-23 07:43:07 -07:00
capability.c
compat.c
configs.c
cpu.c
cpuset.c
dma.c
exec_domain.c
exit.c [PATCH] More BUG_ON conversion 2006-06-23 07:43:08 -07:00
extable.c
fork.c [PATCH] dup fd error fix 2006-06-23 07:43:04 -07:00
futex_compat.c
futex.c
hrtimer.c [PATCH] Define __raw_get_cpu_var and use it 2006-06-25 10:01:01 -07:00
itimer.c
kallsyms.c
Kconfig.hz
Kconfig.preempt
kexec.c [PATCH] Add a sysfs file to determine if a kexec kernel is loaded 2006-06-23 07:43:02 -07:00
kfifo.c
kmod.c
kprobes.c
ksysfs.c [PATCH] Add a sysfs file to determine if a kexec kernel is loaded 2006-06-23 07:43:02 -07:00
kthread.c
Makefile
module.c [PATCH] ensure NULL deref can't possibly happen in is_exported() 2006-06-25 10:00:59 -07:00
mutex-debug.c
mutex-debug.h
mutex.c
mutex.h
panic.c
params.c
pid.c
posix-cpu-timers.c
posix-timers.c
printk.c
profile.c
ptrace.c
rcupdate.c [PATCH] Make RCU API inaccessible to non-GPL Linux kernel modules 2006-06-23 07:43:07 -07:00
rcutorture.c
relay.c
resource.c
sched.c [PATCH] Define __raw_get_cpu_var and use it 2006-06-25 10:01:01 -07:00
seccomp.c
signal.c
softirq.c
softlockup.c [PATCH] Define __raw_get_cpu_var and use it 2006-06-25 10:01:01 -07:00
spinlock.c
stop_machine.c
sys_ni.c
sys.c [PATCH] kernel/sys.c doesn't need init.h 2006-06-23 07:43:07 -07:00
sysctl.c [PATCH] CONFIG_NET=n build fix 2006-06-23 07:43:06 -07:00
time.c
timer.c [PATCH] Define __raw_get_cpu_var and use it 2006-06-25 10:01:01 -07:00
uid16.c
user.c
wait.c
workqueue.c [PATCH] list: use list_replace_init() instead of list_splice_init() 2006-06-23 07:43:07 -07:00