Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1e8352784abaedb424e63fa700e93e6c1307785f Commit: 1e8352784abaedb424e63fa700e93e6c1307785f Parent: 3a2d5b700132f35401f1d9e22fe3c2cab02c2549 Author: Hugh Dickins <[EMAIL PROTECTED]> AuthorDate: Sat Feb 23 19:40:17 2008 +0000 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Sat Feb 23 12:09:28 2008 -0800
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: Hugh Dickins <[EMAIL PROTECTED]> Reviewed-by: Mike Travis <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- include/asm-generic/percpu.h | 2 ++ include/asm-powerpc/percpu.h | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 4b8d31c..b0e63c6 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h @@ -32,6 +32,8 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; */ #ifndef __my_cpu_offset #define __my_cpu_offset per_cpu_offset(raw_smp_processor_id()) +#endif +#ifdef CONFIG_DEBUG_PREEMPT #define my_cpu_offset per_cpu_offset(smp_processor_id()) #else #define my_cpu_offset __my_cpu_offset diff --git a/include/asm-powerpc/percpu.h b/include/asm-powerpc/percpu.h index ccb0523..f879252 100644 --- a/include/asm-powerpc/percpu.h +++ b/include/asm-powerpc/percpu.h @@ -13,7 +13,7 @@ #include <asm/paca.h> #define __per_cpu_offset(cpu) (paca[cpu].data_offset) -#define __my_cpu_offset get_paca()->data_offset +#define __my_cpu_offset local_paca->data_offset #define per_cpu_offset(x) (__per_cpu_offset(x)) #endif /* CONFIG_SMP */ - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html