Skip to content
Commit 1e835278 authored by Hugh Dickins's avatar Hugh Dickins Committed by Linus Torvalds
Browse files

percpu: fix DEBUG_PREEMPT per_cpu checking



2.6.25-rc1 percpu changes broke CONFIG_DEBUG_PREEMPT's per_cpu checking
on several architectures.  On s390, sparc64 and x86 it's been weakened to
not checking at all; whereas on powerpc64 it's become too strict, issuing
warnings from __raw_get_cpu_var in io_schedule and init_timer for example.

Fix this by weakening powerpc's __my_cpu_offset to use the non-checking
local_paca instead of get_paca (which itself contains such a check);
and strengthening the generic my_cpu_offset to go the old slow way via
smp_processor_id when CONFIG_DEBUG_PREEMPT (debug_smp_processor_id is
where all the knowledge of what's correct when lives).

Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
Reviewed-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3a2d5b70
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment