[PATCH 1/7] percpu: Add a DEFINE_PER_CPU_2PAGE_ALIGNED

Andi Kleen
2014-04-28T22:14:00Z

From: Andi Kleen <ak@linux.intel.com>

Needed in a followon patch which needs to naturally align a 8K stack.
I just put it into the page aligned section. This may cause an extra
4K hole if we're unlucky.

Cc: tj@kernel.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
include/linux/percpu-defs.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index a5fc7d0..5b2f5b0 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -142,6 +142,10 @@
DEFINE_PER_CPU_SECTION(type, name, "..page_aligned") \
__aligned(PAGE_SIZE)

+#define DEFINE_PER_CPU_2PAGE_ALIGNED(type, name) \
+ DEFINE_PER_CPU_SECTION(type, name, "..page_aligned") \
+ __aligned(2*PAGE_SIZE)
+
/*
* Declaration/definition used for per-CPU variables that must be read mostly.
*/
--
1.9.0