diff options
-rw-r--r-- | arch/alpha/include/asm/percpu.h | 6 | ||||
-rw-r--r-- | include/asm-generic/percpu.h | 4 | ||||
-rw-r--r-- | include/linux/percpu-defs.h | 3 |
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/alpha/include/asm/percpu.h b/arch/alpha/include/asm/percpu.h index 06c5c7a4afd3..b663f1f10b6a 100644 --- a/arch/alpha/include/asm/percpu.h +++ b/arch/alpha/include/asm/percpu.h | |||
@@ -30,7 +30,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
30 | 30 | ||
31 | #ifndef MODULE | 31 | #ifndef MODULE |
32 | #define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset)) | 32 | #define SHIFT_PERCPU_PTR(var, offset) RELOC_HIDE(&per_cpu_var(var), (offset)) |
33 | #define PER_CPU_ATTRIBUTES | 33 | #define PER_CPU_DEF_ATTRIBUTES |
34 | #else | 34 | #else |
35 | /* | 35 | /* |
36 | * To calculate addresses of locally defined variables, GCC uses 32-bit | 36 | * To calculate addresses of locally defined variables, GCC uses 32-bit |
@@ -49,7 +49,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
49 | : "=&r"(__ptr), "=&r"(tmp_gp)); \ | 49 | : "=&r"(__ptr), "=&r"(tmp_gp)); \ |
50 | (typeof(&per_cpu_var(var)))(__ptr + (offset)); }) | 50 | (typeof(&per_cpu_var(var)))(__ptr + (offset)); }) |
51 | 51 | ||
52 | #define PER_CPU_ATTRIBUTES __used | 52 | #define PER_CPU_DEF_ATTRIBUTES __used |
53 | 53 | ||
54 | #endif /* MODULE */ | 54 | #endif /* MODULE */ |
55 | 55 | ||
@@ -71,7 +71,7 @@ extern unsigned long __per_cpu_offset[NR_CPUS]; | |||
71 | #define __get_cpu_var(var) per_cpu_var(var) | 71 | #define __get_cpu_var(var) per_cpu_var(var) |
72 | #define __raw_get_cpu_var(var) per_cpu_var(var) | 72 | #define __raw_get_cpu_var(var) per_cpu_var(var) |
73 | 73 | ||
74 | #define PER_CPU_ATTRIBUTES | 74 | #define PER_CPU_DEF_ATTRIBUTES |
75 | 75 | ||
76 | #endif /* SMP */ | 76 | #endif /* SMP */ |
77 | 77 | ||
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index d7d50d7ee51e..aa00800adacc 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h | |||
@@ -97,4 +97,8 @@ extern void setup_per_cpu_areas(void); | |||
97 | #define PER_CPU_ATTRIBUTES | 97 | #define PER_CPU_ATTRIBUTES |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #ifndef PER_CPU_DEF_ATTRIBUTES | ||
101 | #define PER_CPU_DEF_ATTRIBUTES | ||
102 | #endif | ||
103 | |||
100 | #endif /* _ASM_GENERIC_PERCPU_H_ */ | 104 | #endif /* _ASM_GENERIC_PERCPU_H_ */ |
diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h index 8f921d74f49f..68438e18fff4 100644 --- a/include/linux/percpu-defs.h +++ b/include/linux/percpu-defs.h | |||
@@ -24,7 +24,8 @@ | |||
24 | 24 | ||
25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ | 25 | #define DEFINE_PER_CPU_SECTION(type, name, section) \ |
26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ | 26 | __attribute__((__section__(PER_CPU_BASE_SECTION section))) \ |
27 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 27 | PER_CPU_ATTRIBUTES PER_CPU_DEF_ATTRIBUTES \ |
28 | __typeof__(type) per_cpu__##name | ||
28 | 29 | ||
29 | /* | 30 | /* |
30 | * Variant on the per-CPU variable declaration/definition theme used for | 31 | * Variant on the per-CPU variable declaration/definition theme used for |