Merge branch 'for-linus' of git://www.linux-m32r.org/git/takata/linux-2.6_dev
[firefly-linux-kernel-4.4.55.git] / include / linux / percpu-defs.h
index aefc2f12b48c3276a77f56d6fdab68e6dd1cee1a..9bd03193ecd48c5e2c1283309a2c8ac2914cab37 100644 (file)
        DEFINE_PER_CPU_SECTION(type, name, PER_CPU_SHARED_ALIGNED_SECTION) \
        ____cacheline_aligned_in_smp
 
+#define DECLARE_PER_CPU_ALIGNED(type, name)                            \
+       DECLARE_PER_CPU_SECTION(type, name, PER_CPU_ALIGNED_SECTION)    \
+       ____cacheline_aligned
+
+#define DEFINE_PER_CPU_ALIGNED(type, name)                             \
+       DEFINE_PER_CPU_SECTION(type, name, PER_CPU_ALIGNED_SECTION)     \
+       ____cacheline_aligned
+
 /*
  * Declaration/definition used for per-CPU variables that must be page aligned.
  */
-#define DECLARE_PER_CPU_PAGE_ALIGNED(type, name)                               \
-       DECLARE_PER_CPU_SECTION(type, name, ".page_aligned")
+#define DECLARE_PER_CPU_PAGE_ALIGNED(type, name)                       \
+       DECLARE_PER_CPU_SECTION(type, name, ".page_aligned")            \
+       __aligned(PAGE_SIZE)
 
 #define DEFINE_PER_CPU_PAGE_ALIGNED(type, name)                                \
-       DEFINE_PER_CPU_SECTION(type, name, ".page_aligned")
+       DEFINE_PER_CPU_SECTION(type, name, ".page_aligned")             \
+       __aligned(PAGE_SIZE)
 
 /*
  * Intermodule exports for per-CPU variables.