Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b32ef636a59aad12f9f9b5dc34c93222842c58ba
Commit:     b32ef636a59aad12f9f9b5dc34c93222842c58ba
Parent:     cf8fa920cb4271f17e0265c863d64bea1b31941a
Author:     [EMAIL PROTECTED] <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:32:51 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:32:51 2008 +0100

    percpu: use a kconfig variable to signal arch specific percpu setup
    
    The use of the __GENERIC_PERCPU is a bit problematic since arches
    may want to run their own percpu setup while using the generic
    percpu definitions. Replace it through a kconfig variable.
    
    Cc: Rusty Russell <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]>
    Signed-off-by: Mike Travis <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
---
 arch/ia64/Kconfig            |    3 +++
 arch/powerpc/Kconfig         |    3 +++
 arch/sparc64/Kconfig         |    3 +++
 arch/x86/Kconfig             |    3 +++
 include/asm-generic/percpu.h |    1 -
 include/asm-s390/percpu.h    |    2 --
 include/asm-x86/percpu_32.h  |    2 --
 init/main.c                  |    4 ++--
 8 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 4a81b7f..5a41e75 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -80,6 +80,9 @@ config GENERIC_TIME_VSYSCALL
        bool
        default y
 
+config ARCH_SETS_UP_PER_CPU_AREA
+       def_bool y
+
 config DMI
        bool
        default y
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index c17a194..fb85f6b 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -42,6 +42,9 @@ config GENERIC_HARDIRQS
        bool
        default y
 
+config ARCH_SETS_UP_PER_CPU_AREA
+       def_bool PPC64
+
 config IRQ_PER_CPU
        bool
        default y
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig
index 1e25bce..26f5791 100644
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -66,6 +66,9 @@ config AUDIT_ARCH
        bool
        default y
 
+config ARCH_SETS_UP_PER_CPU_AREA
+       def_bool y
+
 config ARCH_NO_VIRT_TO_BUS
        def_bool y
 
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 1de28e8..dc80a9f 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -97,6 +97,9 @@ config GENERIC_TIME_VSYSCALL
        bool
        default X86_64
 
+config ARCH_SETS_UP_PER_CPU_AREA
+       def_bool X86_64
+
 config ARCH_SUPPORTS_OPROFILE
        bool
        default y
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index d85172e..b5e53b9 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -3,7 +3,6 @@
 #include <linux/compiler.h>
 #include <linux/threads.h>
 
-#define __GENERIC_PER_CPU
 #ifdef CONFIG_SMP
 
 extern unsigned long __per_cpu_offset[NR_CPUS];
diff --git a/include/asm-s390/percpu.h b/include/asm-s390/percpu.h
index 545857e..f94d0d3 100644
--- a/include/asm-s390/percpu.h
+++ b/include/asm-s390/percpu.h
@@ -4,8 +4,6 @@
 #include <linux/compiler.h>
 #include <asm/lowcore.h>
 
-#define __GENERIC_PER_CPU
-
 /*
  * s390 uses its own implementation for per cpu data, the offset of
  * the cpu local data area is cached in the cpu's lowcore memory.
diff --git a/include/asm-x86/percpu_32.h b/include/asm-x86/percpu_32.h
index a7ebd43..3949586 100644
--- a/include/asm-x86/percpu_32.h
+++ b/include/asm-x86/percpu_32.h
@@ -41,8 +41,6 @@
  *    PER_CPU(cpu_gdt_descr, %ebx)
  */
 #ifdef CONFIG_SMP
-/* Same as generic implementation except for optimized local access. */
-#define __GENERIC_PER_CPU
 
 /* This is used for other cpus to find our section. */
 extern unsigned long __per_cpu_offset[];
diff --git a/init/main.c b/init/main.c
index f287ca5..3f8aba2 100644
--- a/init/main.c
+++ b/init/main.c
@@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { 
}
 
 #else
 
-#ifdef __GENERIC_PER_CPU
+#ifndef CONFIG_ARCH_SETS_UP_PER_CPU_AREA
 unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
 
 EXPORT_SYMBOL(__per_cpu_offset);
@@ -384,7 +384,7 @@ static void __init setup_per_cpu_areas(void)
                ptr += size;
        }
 }
-#endif /* !__GENERIC_PER_CPU */
+#endif /* CONFIG_ARCH_SETS_UP_CPU_AREA */
 
 /* Called by boot processor to activate the rest. */
 static void __init smp_init(void)
-
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

Reply via email to