diff options
Diffstat (limited to 'include/asm-ia64')
-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)! |