linux-stable-rt/kernel
Ingo Molnar 39c715b717 [PATCH] smp_processor_id() cleanup
This patch implements a number of smp_processor_id() cleanup ideas that
Arjan van de Ven and I came up with.

The previous __smp_processor_id/_smp_processor_id/smp_processor_id API
spaghetti was hard to follow both on the implementational and on the
usage side.

Some of the complexity arose from picking wrong names, some of the
complexity comes from the fact that not all architectures defined
__smp_processor_id.

In the new code, there are two externally visible symbols:

 - smp_processor_id(): debug variant.

 - raw_smp_processor_id(): nondebug variant. Replaces all existing
   uses of _smp_processor_id() and __smp_processor_id(). Defined
   by every SMP architecture in include/asm-*/smp.h.

There is one new internal symbol, dependent on DEBUG_PREEMPT:

 - debug_smp_processor_id(): internal debug variant, mapped to
                             smp_processor_id().

Also, i moved debug_smp_processor_id() from lib/kernel_lock.c into a new
lib/smp_processor_id.c file.  All related comments got updated and/or
clarified.

I have build/boot tested the following 8 .config combinations on x86:

 {SMP,UP} x {PREEMPT,!PREEMPT} x {DEBUG_PREEMPT,!DEBUG_PREEMPT}

I have also build/boot tested x64 on UP/PREEMPT/DEBUG_PREEMPT.  (Other
architectures are untested, but should work just fine.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-06-21 18:46:13 -07:00
..
irq [PATCH] drop note_interrupt() for per-CPU for proper scaling 2005-05-28 11:14:00 -07:00
power [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
Makefile
acct.c
audit.c AUDIT: Unify auid reporting, put arch before syscall number 2005-05-23 21:35:28 +01:00
auditsc.c AUDIT: Record working directory when syscall arguments are pathnames 2005-05-27 12:17:28 +01:00
capability.c
compat.c
configs.c
cpu.c
cpuset.c [PATCH] cpuset exit NULL dereference fix 2005-05-27 08:07:26 -07:00
dma.c
exec_domain.c
exit.c [PATCH] timer exit cleanup 2005-06-17 10:03:50 -07:00
extable.c
fork.c
futex.c
intermodule.c
itimer.c
kallsyms.c
kfifo.c
kmod.c
kprobes.c
ksysfs.c
kthread.c
module.c [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
panic.c
params.c [PATCH] sysfs: (rest) if show/store is missing return -EIO 2005-06-20 15:15:03 -07:00
pid.c
posix-cpu-timers.c
posix-timers.c [PATCH] timer exit cleanup 2005-06-17 10:03:50 -07:00
printk.c [PATCH] add_preferred_console() build fix 2005-05-17 07:59:19 -07:00
profile.c [PATCH] profile.c: `schedule' parsing fix 2005-05-17 07:59:21 -07:00
ptrace.c
rcupdate.c
resource.c
sched.c [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
seccomp.c
signal.c Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2005-06-02 16:39:11 +01:00
softirq.c
spinlock.c [PATCH] spin_unlock_bh() and preempt_check_resched() 2005-05-21 10:46:48 -07:00
stop_machine.c [PATCH] smp_processor_id() cleanup 2005-06-21 18:46:13 -07:00
sys.c
sys_ni.c [PATCH] consolidate sys_shmat 2005-05-01 08:59:12 -07:00
sysctl.c
time.c
timer.c
uid16.c
user.c
wait.c
workqueue.c