From 16ffa266d08cfbfcc2bef47804e6bc800550acbb Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Wed, 14 May 2008 16:05:51 -0700 Subject: [PATCH] --- yaml --- r: 96745 b: refs/heads/master c: 44c81433e8b05dbc85985d939046f10f95901184 h: refs/heads/master i: 96743: 6caa9ad6fb1308c8cdfb49a5a87338a8408448df v: v3 --- [refs] | 2 +- trunk/include/linux/percpu.h | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 8b577f18206f..a6228ce813d9 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fd8a4221ad76df700ff34875c9fbc42302aa4ba3 +refs/heads/master: 44c81433e8b05dbc85985d939046f10f95901184 diff --git a/trunk/include/linux/percpu.h b/trunk/include/linux/percpu.h index d746a2abb322..4cdd393e71e1 100644 --- a/trunk/include/linux/percpu.h +++ b/trunk/include/linux/percpu.h @@ -13,8 +13,14 @@ __attribute__((__section__(".data.percpu"))) \ 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) \ - __attribute__((__section__(".data.percpu.shared_aligned"))) \ + __attribute__((__section__(SHARED_ALIGNED_SECTION))) \ PER_CPU_ATTRIBUTES __typeof__(type) per_cpu__##name \ ____cacheline_aligned_in_smp #else