|
@@ -13,8 +13,14 @@
|
|
__attribute__((__section__(".data.percpu"))) \
|
|
__attribute__((__section__(".data.percpu"))) \
|
|
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
|
|
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name
|
|
|
|
|
|
|
|
+#ifdef MODULE
|
|
|
|
+#define SHARED_ALIGNED_SECTION ".data.percpu"
|
|
|
|
+#else
|
|
|
|
+#define SHARED_ALIGNED_SECTION ".data.percpu.shared_aligned"
|
|
|
|
+#endif
|
|
|
|
+
|
|
#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
|
|
#define DEFINE_PER_CPU_SHARED_ALIGNED(type, name) \
|
|
- __attribute__((__section__(".data.percpu.shared_aligned"))) \
|
|
|
|
|
|
+ __attribute__((__section__(SHARED_ALIGNED_SECTION))) \
|
|
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \
|
|
PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \
|
|
____cacheline_aligned_in_smp
|
|
____cacheline_aligned_in_smp
|
|
#else
|
|
#else
|