Commit b32ef636a59aad12f9f9b5dc34c93222842c58ba

Authored by travis@sgi.com
Committed by Ingo Molnar
1 parent cf8fa920cb

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: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

Showing 8 changed files with 14 additions and 7 deletions Side-by-side Diff

... ... @@ -80,6 +80,9 @@
80 80 bool
81 81 default y
82 82  
  83 +config ARCH_SETS_UP_PER_CPU_AREA
  84 + def_bool y
  85 +
83 86 config DMI
84 87 bool
85 88 default y
arch/powerpc/Kconfig
... ... @@ -42,6 +42,9 @@
42 42 bool
43 43 default y
44 44  
  45 +config ARCH_SETS_UP_PER_CPU_AREA
  46 + def_bool PPC64
  47 +
45 48 config IRQ_PER_CPU
46 49 bool
47 50 default y
arch/sparc64/Kconfig
... ... @@ -66,6 +66,9 @@
66 66 bool
67 67 default y
68 68  
  69 +config ARCH_SETS_UP_PER_CPU_AREA
  70 + def_bool y
  71 +
69 72 config ARCH_NO_VIRT_TO_BUS
70 73 def_bool y
71 74  
... ... @@ -97,6 +97,9 @@
97 97 bool
98 98 default X86_64
99 99  
  100 +config ARCH_SETS_UP_PER_CPU_AREA
  101 + def_bool X86_64
  102 +
100 103 config ARCH_SUPPORTS_OPROFILE
101 104 bool
102 105 default y
include/asm-generic/percpu.h
... ... @@ -3,7 +3,6 @@
3 3 #include <linux/compiler.h>
4 4 #include <linux/threads.h>
5 5  
6   -#define __GENERIC_PER_CPU
7 6 #ifdef CONFIG_SMP
8 7  
9 8 extern unsigned long __per_cpu_offset[NR_CPUS];
include/asm-s390/percpu.h
... ... @@ -4,8 +4,6 @@
4 4 #include <linux/compiler.h>
5 5 #include <asm/lowcore.h>
6 6  
7   -#define __GENERIC_PER_CPU
8   -
9 7 /*
10 8 * s390 uses its own implementation for per cpu data, the offset of
11 9 * the cpu local data area is cached in the cpu's lowcore memory.
include/asm-x86/percpu_32.h
... ... @@ -41,8 +41,6 @@
41 41 * PER_CPU(cpu_gdt_descr, %ebx)
42 42 */
43 43 #ifdef CONFIG_SMP
44   -/* Same as generic implementation except for optimized local access. */
45   -#define __GENERIC_PER_CPU
46 44  
47 45 /* This is used for other cpus to find our section. */
48 46 extern unsigned long __per_cpu_offset[];
... ... @@ -363,7 +363,7 @@
363 363  
364 364 #else
365 365  
366   -#ifdef __GENERIC_PER_CPU
  366 +#ifndef CONFIG_ARCH_SETS_UP_PER_CPU_AREA
367 367 unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
368 368  
369 369 EXPORT_SYMBOL(__per_cpu_offset);
... ... @@ -384,7 +384,7 @@
384 384 ptr += size;
385 385 }
386 386 }
387   -#endif /* !__GENERIC_PER_CPU */
  387 +#endif /* CONFIG_ARCH_SETS_UP_CPU_AREA */
388 388  
389 389 /* Called by boot processor to activate the rest. */
390 390 static void __init smp_init(void)