diff options
author | travis@sgi.com <travis@sgi.com> | 2008-01-30 07:32:52 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:32:52 -0500 |
commit | 5280e004fc22314122c84978c0b6a741cf96dc0f (patch) | |
tree | 008b96d81a924be764629f62f98fa5f7c9e04773 /include/asm-ia64/percpu.h | |
parent | b32ef636a59aad12f9f9b5dc34c93222842c58ba (diff) |
percpu: move arch XX_PER_CPU_XX definitions into linux/percpu.h
- Special consideration for IA64: Add the ability to specify
arch specific per cpu flags
- remove .data.percpu attribute from DEFINE_PER_CPU for non-smp case.
The arch definitions are all the same. So move them into linux/percpu.h.
We cannot move DECLARE_PER_CPU since some include files just include
asm/percpu.h to avoid include recursion problems.
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>
Diffstat (limited to 'include/asm-ia64/percpu.h')
-rw-r--r-- | include/asm-ia64/percpu.h | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h index c4f1e328a5ba..0095bcf79848 100644 --- a/include/asm-ia64/percpu.h +++ b/include/asm-ia64/percpu.h | |||
@@ -16,28 +16,11 @@ | |||
16 | #include <linux/threads.h> | 16 | #include <linux/threads.h> |
17 | 17 | ||
18 | #ifdef HAVE_MODEL_SMALL_ATTRIBUTE | 18 | #ifdef HAVE_MODEL_SMALL_ATTRIBUTE |
19 | # define __SMALL_ADDR_AREA __attribute__((__model__ (__small__))) | 19 | # define PER_CPU_ATTRIBUTES __attribute__((__model__ (__small__))) |
20 | #else | ||
21 | # define __SMALL_ADDR_AREA | ||
22 | #endif | 20 | #endif |
23 | 21 | ||
24 | #define DECLARE_PER_CPU(type, name) \ | 22 | #define DECLARE_PER_CPU(type, name) \ |
25 | extern __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name | 23 | extern PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name |
26 | |||
27 | /* Separate out the type, so (int[3], foo) works. */ | ||
28 | #define DEFINE_PER_CPU(type, name) \ | ||
29 | __attribute__((__section__(".data.percpu"))) \ | ||
30 | __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name | ||
31 | |||
32 | #ifdef CONFIG_SMP | ||
33 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
34 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | ||
35 | __SMALL_ADDR_AREA __typeof__(type) per_cpu__##name \ | ||
36 | ____cacheline_aligned_in_smp | ||
37 | #else | ||
38 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | ||
39 | DEFINE_PER_CPU(type, name) | ||
40 | #endif | ||
41 | 24 | ||
42 | /* | 25 | /* |
43 | * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an | 26 | * Pretty much a literal copy of asm-generic/percpu.h, except that percpu_modcopy() is an |
@@ -68,9 +51,6 @@ extern void *per_cpu_init(void); | |||
68 | 51 | ||
69 | #endif /* SMP */ | 52 | #endif /* SMP */ |
70 | 53 | ||
71 | #define EXPORT_PER_CPU_SYMBOL(var) EXPORT_SYMBOL(per_cpu__##var) | ||
72 | #define EXPORT_PER_CPU_SYMBOL_GPL(var) EXPORT_SYMBOL_GPL(per_cpu__##var) | ||
73 | |||
74 | /* | 54 | /* |
75 | * Be extremely careful when taking the address of this variable! Due to virtual | 55 | * Be extremely careful when taking the address of this variable! Due to virtual |
76 | * remapping, it is different from the canonical address returned by __get_cpu_var(var)! | 56 | * remapping, it is different from the canonical address returned by __get_cpu_var(var)! |