]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] Always put cache aligned code in own section, even for modules
authorRusty Russell <rusty@rustcorp.com.au>
Thu, 26 Feb 2004 02:07:36 +0000 (18:07 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 26 Feb 2004 02:07:36 +0000 (18:07 -0800)
We put ____cacheline_aligned things in their own section, simply
because we waste less space that way.  Otherwise we end up padding
innocent variables to the next cacheline to get the required
alignment.

There's no reason not to do this in modules, too.

include/linux/cache.h

index 3db3832f35cb40d6f6b77a3c422b1f37008bde89..4d767b93738a9461268910c87757c6f1fe7e5e4c 100644 (file)
 #endif
 
 #ifndef __cacheline_aligned
-#ifdef MODULE
-#define __cacheline_aligned ____cacheline_aligned
-#else
 #define __cacheline_aligned                                    \
   __attribute__((__aligned__(SMP_CACHE_BYTES),                 \
                 __section__(".data.cacheline_aligned")))
-#endif
 #endif /* __cacheline_aligned */
 
 #ifndef __cacheline_aligned_in_smp