From: travis@sgi.com
To: Andrew Morton <akpm@linux-foundation.org>,
mingo@elte.hu, Andi Kleen <ak@suse.de>,
Christoph Lameter <clameter@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Rusty Russell <rusty@rustcorp.com.au>,
Sam Ravnborg <sam@ravnborg.org>
Subject: [PATCH 01/10] percpu: Use a kconfig variable to signal arch specific percpu setup
Date: Tue, 08 Jan 2008 13:10:24 -0800 [thread overview]
Message-ID: <20080108211024.096539000@sgi.com> (raw)
In-Reply-To: <20080108211023.923047000@sgi.com>
[-- Attachment #1: arch_sets_up_per_cpu_areas --]
[-- Type: text/plain, Size: 3691 bytes --]
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>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Mike Travis <travis@sgi.com>
---
V1->V2:
- Use def_bool as suggested by Randy.
V3->v4:
- change config ARCH_SETS_UP_PER_CPU_AREA to a global var
and use select HAVE_SETUP_PER_CPU_AREA to specify.
---
arch/Kconfig | 3 +++
arch/ia64/Kconfig | 1 +
arch/powerpc/Kconfig | 4 ++++
arch/sparc64/Kconfig | 1 +
arch/x86/Kconfig | 1 +
include/asm-generic/percpu.h | 1 -
include/asm-s390/percpu.h | 2 --
include/asm-x86/percpu_32.h | 2 --
init/main.c | 4 ++--
9 files changed, 12 insertions(+), 7 deletions(-)
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -29,3 +29,6 @@ config KPROBES
config HAVE_KPROBES
def_bool n
+
+config HAVE_SETUP_PER_CPU_AREA
+ def_bool n
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -17,6 +17,7 @@ config IA64
select ARCH_SUPPORTS_MSI
select HAVE_OPROFILE
select HAVE_KPROBES
+ select HAVE_SETUP_PER_CPU_AREA
default y
help
The Itanium Processor Family is Intel's 64-bit successor to
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -42,6 +42,10 @@ config GENERIC_HARDIRQS
bool
default y
+config PPC64
+ select HAVE_SETUP_PER_CPU_AREA
+ default y
+
config IRQ_PER_CPU
bool
default y
--- a/arch/sparc64/Kconfig
+++ b/arch/sparc64/Kconfig
@@ -10,6 +10,7 @@ config SPARC
default y
select HAVE_OPROFILE
select HAVE_KPROBES
+ select HAVE_SETUP_PER_CPU_AREA
config SPARC64
bool
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -20,6 +20,7 @@ config X86
def_bool y
select HAVE_OPROFILE
select HAVE_KPROBES
+ select HAVE_SETUP_PER_CPU_AREA if ARCH = "x86_64"
config GENERIC_LOCKBREAK
def_bool n
--- 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];
--- 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.
--- 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[];
--- a/init/main.c
+++ b/init/main.c
@@ -363,7 +363,7 @@ static inline void smp_prepare_cpus(unsi
#else
-#ifdef __GENERIC_PER_CPU
+#ifndef CONFIG_HAVE_SETUP_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_HAVE_SETUP_PER_CPU_AREA */
/* Called by boot processor to activate the rest. */
static void __init smp_init(void)
--
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-01-08 21:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 21:10 [PATCH 00/10] percpu: Per cpu code simplification V4 travis
2008-01-08 21:10 ` travis [this message]
2008-01-08 21:10 ` [PATCH 02/10] percpu: Move arch XX_PER_CPU_XX definitions into linux/percpu.h travis
2008-01-08 21:10 ` [PATCH 03/10] percpu: Make the asm-generic/percpu.h more "generic" travis
2008-01-08 21:10 ` [PATCH 04/10] x86_32: Use generic percpu.h travis
2008-01-08 21:10 ` [PATCH 05/10] x86_64: Use generic percpu travis
2008-01-08 21:10 ` [PATCH 06/10] s390: " travis
2008-01-08 21:10 ` [PATCH 07/10] Powerpc: Use generic per cpu travis
2008-01-08 21:10 ` [PATCH 08/10] Sparc64: Use generic percpu travis
2008-01-08 21:10 ` [PATCH 09/10] ia64: " travis
2008-01-08 21:10 ` [PATCH 10/10] x86: Unify percpu.h travis
2008-01-09 19:28 ` Dave Hansen
2008-01-09 19:31 ` Christoph Lameter
2008-01-09 19:53 ` Dave Hansen
2008-01-09 20:11 ` Christoph Lameter
2008-01-10 13:48 ` Ingo Molnar
-- strict thread matches above, loose matches on Subject: below --
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 19:24 ` Sam Ravnborg
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: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:15 ` David Miller, 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=20080108211024.096539000@sgi.com \
--to=travis@sgi.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
--cc=sam@ravnborg.org \
--cc=steiner@sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox