Commit b32ef636 authored by travis@sgi.com's avatar travis@sgi.com Committed by Ingo Molnar

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 <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarMike Travis <travis@sgi.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent cf8fa920
...@@ -80,6 +80,9 @@ config GENERIC_TIME_VSYSCALL ...@@ -80,6 +80,9 @@ config GENERIC_TIME_VSYSCALL
bool bool
default y default y
config ARCH_SETS_UP_PER_CPU_AREA
def_bool y
config DMI config DMI
bool bool
default y default y
......
...@@ -42,6 +42,9 @@ config GENERIC_HARDIRQS ...@@ -42,6 +42,9 @@ config GENERIC_HARDIRQS
bool bool
default y default y
config ARCH_SETS_UP_PER_CPU_AREA
def_bool PPC64
config IRQ_PER_CPU config IRQ_PER_CPU
bool bool
default y default y
......
...@@ -66,6 +66,9 @@ config AUDIT_ARCH ...@@ -66,6 +66,9 @@ config AUDIT_ARCH
bool bool
default y default y
config ARCH_SETS_UP_PER_CPU_AREA
def_bool y
config ARCH_NO_VIRT_TO_BUS config ARCH_NO_VIRT_TO_BUS
def_bool y def_bool y
......
...@@ -97,6 +97,9 @@ config GENERIC_TIME_VSYSCALL ...@@ -97,6 +97,9 @@ config GENERIC_TIME_VSYSCALL
bool bool
default X86_64 default X86_64
config ARCH_SETS_UP_PER_CPU_AREA
def_bool X86_64
config ARCH_SUPPORTS_OPROFILE config ARCH_SUPPORTS_OPROFILE
bool bool
default y default y
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/threads.h> #include <linux/threads.h>
#define __GENERIC_PER_CPU
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern unsigned long __per_cpu_offset[NR_CPUS]; extern unsigned long __per_cpu_offset[NR_CPUS];
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <asm/lowcore.h> #include <asm/lowcore.h>
#define __GENERIC_PER_CPU
/* /*
* s390 uses its own implementation for per cpu data, the offset of * 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. * the cpu local data area is cached in the cpu's lowcore memory.
......
...@@ -41,8 +41,6 @@ ...@@ -41,8 +41,6 @@
* PER_CPU(cpu_gdt_descr, %ebx) * PER_CPU(cpu_gdt_descr, %ebx)
*/ */
#ifdef CONFIG_SMP #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. */ /* This is used for other cpus to find our section. */
extern unsigned long __per_cpu_offset[]; extern unsigned long __per_cpu_offset[];
......
...@@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { } ...@@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#else #else
#ifdef __GENERIC_PER_CPU #ifndef CONFIG_ARCH_SETS_UP_PER_CPU_AREA
unsigned long __per_cpu_offset[NR_CPUS] __read_mostly; unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
EXPORT_SYMBOL(__per_cpu_offset); EXPORT_SYMBOL(__per_cpu_offset);
...@@ -384,7 +384,7 @@ static void __init setup_per_cpu_areas(void) ...@@ -384,7 +384,7 @@ static void __init setup_per_cpu_areas(void)
ptr += size; ptr += size;
} }
} }
#endif /* !__GENERIC_PER_CPU */ #endif /* CONFIG_ARCH_SETS_UP_CPU_AREA */
/* Called by boot processor to activate the rest. */ /* Called by boot processor to activate the rest. */
static void __init smp_init(void) static void __init smp_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment