From: Christoph Lameter <clameter@sgi.com>
To: akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>, Andi Kleen <ak@suse.de>
Subject: [patch 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup
Date: Wed, 28 Nov 2007 13:09:27 -0800 [thread overview]
Message-ID: <20071128211526.149834716@sgi.com> (raw)
In-Reply-To: 20071128210926.008783214@sgi.com
[-- Attachment #1: arch_sets_up_per_cpu_areas --]
[-- Type: text/plain, Size: 4838 bytes --]
V1->V2:
- Use def_bool as suggested by Randy.
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>
---
arch/ia64/Kconfig | 3 +++
arch/powerpc/Kconfig | 3 +++
arch/sparc64/Kconfig | 3 +++
arch/x86/Kconfig | 5 ++---
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, 13 insertions(+), 10 deletions(-)
Index: linux-2.6.24-rc3-mm2/init/main.c
===================================================================
--- linux-2.6.24-rc3-mm2.orig/init/main.c 2007-11-28 12:51:28.288463092 -0800
+++ linux-2.6.24-rc3-mm2/init/main.c 2007-11-28 12:51:38.636214129 -0800
@@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsi
#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(v
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)
Index: linux-2.6.24-rc3-mm2/arch/ia64/Kconfig
===================================================================
--- linux-2.6.24-rc3-mm2.orig/arch/ia64/Kconfig 2007-11-28 12:51:28.300463519 -0800
+++ linux-2.6.24-rc3-mm2/arch/ia64/Kconfig 2007-11-28 12:51:38.640213057 -0800
@@ -75,6 +75,9 @@ config GENERIC_TIME_VSYSCALL
bool
default y
+config ARCH_SETS_UP_PER_CPU_AREA
+ def_bool y
+
config DMI
bool
default y
Index: linux-2.6.24-rc3-mm2/arch/powerpc/Kconfig
===================================================================
--- linux-2.6.24-rc3-mm2.orig/arch/powerpc/Kconfig 2007-11-28 12:51:28.312463458 -0800
+++ linux-2.6.24-rc3-mm2/arch/powerpc/Kconfig 2007-11-28 12:51:38.640213057 -0800
@@ -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
Index: linux-2.6.24-rc3-mm2/arch/sparc64/Kconfig
===================================================================
--- linux-2.6.24-rc3-mm2.orig/arch/sparc64/Kconfig 2007-11-28 12:51:28.391963652 -0800
+++ linux-2.6.24-rc3-mm2/arch/sparc64/Kconfig 2007-11-28 12:51:38.640213057 -0800
@@ -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
Index: linux-2.6.24-rc3-mm2/arch/x86/Kconfig
===================================================================
--- linux-2.6.24-rc3-mm2.orig/arch/x86/Kconfig 2007-11-28 12:51:28.407962976 -0800
+++ linux-2.6.24-rc3-mm2/arch/x86/Kconfig 2007-11-28 12:51:38.782051096 -0800
@@ -120,9 +120,8 @@ config GENERIC_TIME_VSYSCALL
bool
default X86_64
-
-
-
+config ARCH_SETS_UP_PER_CPU_AREA
+ def_bool X86_64
config ZONE_DMA32
bool
Index: linux-2.6.24-rc3-mm2/include/asm-generic/percpu.h
===================================================================
--- linux-2.6.24-rc3-mm2.orig/include/asm-generic/percpu.h 2007-11-28 12:51:28.419963226 -0800
+++ linux-2.6.24-rc3-mm2/include/asm-generic/percpu.h 2007-11-28 12:51:38.782051096 -0800
@@ -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];
Index: linux-2.6.24-rc3-mm2/include/asm-x86/percpu_32.h
===================================================================
--- linux-2.6.24-rc3-mm2.orig/include/asm-x86/percpu_32.h 2007-11-28 12:51:28.431963118 -0800
+++ linux-2.6.24-rc3-mm2/include/asm-x86/percpu_32.h 2007-11-28 12:51:38.782051096 -0800
@@ -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[];
Index: linux-2.6.24-rc3-mm2/include/asm-s390/percpu.h
===================================================================
--- linux-2.6.24-rc3-mm2.orig/include/asm-s390/percpu.h 2007-11-28 12:51:28.443963942 -0800
+++ linux-2.6.24-rc3-mm2/include/asm-s390/percpu.h 2007-11-28 12:51:38.784139633 -0800
@@ -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.
--
next prev parent reply other threads:[~2007-11-28 21:15 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-28 21:09 [patch 00/10] Per cpu code simplification V2 Christoph Lameter
2007-11-28 21:09 ` Christoph Lameter [this message]
2007-11-28 21:09 ` [patch 02/10] percpu: Move arch XX_PER_CPU_XX definitions into linux/percpu.h Christoph Lameter
2007-11-28 21:09 ` [patch 03/10] percpu: Make the asm-generic/percpu.h more "generic" Christoph Lameter
2007-11-30 11:10 ` Ingo Molnar
2007-11-30 17:09 ` Christoph Lameter
2007-11-30 17:14 ` Ingo Molnar
2007-11-30 17:17 ` Christoph Lameter
2007-11-30 17:58 ` Ingo Molnar
2007-11-30 18:12 ` Ingo Molnar
2007-11-30 18:42 ` Christoph Lameter
2007-11-30 18:49 ` Ingo Molnar
2007-11-30 19:01 ` Christoph Lameter
2007-11-30 19:33 ` Christoph Lameter
2007-11-30 20:13 ` Ingo Molnar
2007-11-28 21:09 ` [patch 04/10] x86_32: Use generic percpu.h Christoph Lameter
2007-11-30 11:11 ` Ingo Molnar
2007-11-28 21:09 ` [patch 05/10] x86_64: Use generic percpu Christoph Lameter
2007-11-30 11:11 ` Ingo Molnar
2007-11-28 21:09 ` [patch 06/10] s390: " Christoph Lameter
2007-11-29 15:56 ` Martin Schwidefsky
2007-11-29 18:16 ` Christoph Lameter
2007-11-28 21:09 ` [patch 07/10] Powerpc: Use generic per cpu Christoph Lameter
2007-11-28 21:09 ` [patch 08/10] Sparc64: Use generic percpu Christoph Lameter
2007-11-28 21:09 ` [patch 09/10] ia64: " Christoph Lameter
2007-11-28 21:09 ` Christoph Lameter
2007-11-28 21:09 ` [patch 10/10] x86: Unify percpu.h Christoph Lameter
2007-11-30 11:14 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
2007-12-28 0:10 [PATCH 00/10] percpu: Per cpu code simplification V2 travis
2007-12-28 0:10 ` [PATCH 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup travis
2007-12-28 0:10 ` travis
2007-12-28 0:15 ` David Miller
2007-12-28 0:15 ` David Miller, travis
2007-12-28 0:16 [PATCH 00/10] percpu: Per cpu code simplification V2 travis
2007-12-28 0:16 ` [PATCH 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup travis
2007-12-28 0:16 ` travis
2008-01-08 2:11 [PATCH 00/10] percpu: Per cpu code simplification V3 travis
2008-01-08 2:11 ` [PATCH 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup travis
2008-01-08 2:11 ` travis
2008-01-08 19:24 ` Sam Ravnborg
2008-01-08 19:24 ` Sam Ravnborg
2008-01-08 21:10 [PATCH 00/10] percpu: Per cpu code simplification V4 travis
2008-01-08 21:10 ` [PATCH 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup travis
2008-01-08 21:10 ` travis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071128211526.149834716@sgi.com \
--to=clameter@sgi.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.