Commit 6c34bb17 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Always put cache aligned code in own section, even for modules

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.
parent 56f1be79
......@@ -26,13 +26,9 @@
#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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment