diff options
-rw-r--r-- | arch/ia64/include/asm/percpu.h | 4 | ||||
-rw-r--r-- | include/linux/percpu.h | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/ia64/include/asm/percpu.h b/arch/ia64/include/asm/percpu.h index 77f30b664b4e..30cf46534dd2 100644 --- a/arch/ia64/include/asm/percpu.h +++ b/arch/ia64/include/asm/percpu.h | |||
@@ -27,12 +27,12 @@ extern void *per_cpu_init(void); | |||
27 | 27 | ||
28 | #else /* ! SMP */ | 28 | #else /* ! SMP */ |
29 | 29 | ||
30 | #define PER_CPU_ATTRIBUTES __attribute__((__section__(".data.percpu"))) | ||
31 | |||
32 | #define per_cpu_init() (__phys_per_cpu_start) | 30 | #define per_cpu_init() (__phys_per_cpu_start) |
33 | 31 | ||
34 | #endif /* SMP */ | 32 | #endif /* SMP */ |
35 | 33 | ||
34 | #define PER_CPU_BASE_SECTION ".data.percpu" | ||
35 | |||
36 | /* | 36 | /* |
37 | * Be extremely careful when taking the address of this variable! Due to virtual | 37 | * Be extremely careful when taking the address of this variable! Due to virtual |
38 | * remapping, it is different from the canonical address returned by __get_cpu_var(var)! | 38 | * remapping, it is different from the canonical address returned by __get_cpu_var(var)! |
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index 0e24202b5a4e..3577ffd90d45 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -8,8 +8,15 @@ | |||
8 | 8 | ||
9 | #include <asm/percpu.h> | 9 | #include <asm/percpu.h> |
10 | 10 | ||
11 | #ifndef PER_CPU_BASE_SECTION | ||
11 | #ifdef CONFIG_SMP | 12 | #ifdef CONFIG_SMP |
12 | #define PER_CPU_BASE_SECTION ".data.percpu" | 13 | #define PER_CPU_BASE_SECTION ".data.percpu" |
14 | #else | ||
15 | #define PER_CPU_BASE_SECTION ".data" | ||
16 | #endif | ||
17 | #endif | ||
18 | |||
19 | #ifdef CONFIG_SMP | ||
13 | 20 | ||
14 | #ifdef MODULE | 21 | #ifdef MODULE |
15 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | 22 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
@@ -20,7 +27,6 @@ | |||
20 | 27 | ||
21 | #else | 28 | #else |
22 | 29 | ||
23 | #define PER_CPU_BASE_SECTION ".data" | ||
24 | #define PER_CPU_SHARED_ALIGNED_SECTION "" | 30 | #define PER_CPU_SHARED_ALIGNED_SECTION "" |
25 | #define PER_CPU_FIRST_SECTION "" | 31 | #define PER_CPU_FIRST_SECTION "" |
26 | 32 | ||