diff options
-rw-r--r-- | include/linux/percpu.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/percpu.h b/include/linux/percpu.h index d746a2abb322..4cdd393e71e1 100644 --- a/include/linux/percpu.h +++ b/include/linux/percpu.h | |||
@@ -13,8 +13,14 @@ | |||
13 | __attribute__((__section__(".data.percpu"))) \ | 13 | __attribute__((__section__(".data.percpu"))) \ |
14 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name | 14 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name |
15 | 15 | ||
16 | #ifdef MODULE | ||
17 | #define SHARED_ALIGNED_SECTION ".data.percpu" | ||
18 | #else | ||
19 | #define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned" | ||
20 | #endif | ||
21 | |||
16 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ | 22 | #define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \ |
17 | __attribute__((__section__(".data.percpu.shared_aligned"))) \ | 23 | __attribute__((__section__(SHARED_ALIGNED_SECTION))) \ |
18 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ | 24 | PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ |
19 | ____cacheline_aligned_in_smp | 25 | ____cacheline_aligned_in_smp |
20 | #else | 26 | #else |