2009-09-09 02:49:19

by Tim Abbott

[permalink] [raw]
Subject: [PATCH v2 0/5] Use macros rather than hardcoding section names

This patch series cleans up the kernel's explicit references to
.data.page_aligned, .bss.page_aligned, and .data.init_task to instead
use the standard macros for those sections.embly code.

This version of the patch series differs from the previous one in that
I've added a new patch that fixes breakage in the x86 linker script
caused indirectly by the last patch in the patch series.

This cleanup is in preparation for being able to change the names of
the .data.page_aligned and .bss.page_aligned sections to be
compatabible with -ffunction-sections -fdata-sections.

This patch series doesn't touch the kernel's linker scripts, only the
C and assembly files. I've now sent to the LKML patches cleaning up
all the architecture linker scripts as well; the total diffstat for
this section name cleanup project targeted at 2.6.32 is:
79 files changed, 339 insertions(+), 1446 deletions(-)

Joe Perches (1):
Use new __init_task_data macro in arch init_task.c files.

Tim Abbott (4):
kbuild: Don't define ALIGN and ENTRY when preprocessing linker
scripts.
Use macros for .bss.page_aligned section.
powerpc: remove unused __page_aligned definition.
Use macros for .data.page_aligned section.

arch/arm/kernel/init_task.c | 5 ++---
arch/avr32/kernel/init_task.c | 5 ++---
arch/avr32/mm/init.c | 4 +---
arch/cris/kernel/process.c | 5 ++---
arch/frv/kernel/init_task.c | 5 ++---
arch/h8300/kernel/init_task.c | 5 ++---
arch/ia64/kernel/init_task.c | 3 ++-
arch/m32r/kernel/init_task.c | 5 ++---
arch/m68k/kernel/process.c | 6 +++---
arch/m68knommu/kernel/init_task.c | 5 ++---
arch/microblaze/kernel/init_task.c | 5 ++---
arch/mips/kernel/init_task.c | 5 ++---
arch/mn10300/kernel/init_task.c | 5 ++---
arch/parisc/kernel/init_task.c | 4 ++--
arch/powerpc/include/asm/page_64.h | 8 --------
arch/powerpc/kernel/init_task.c | 5 ++---
arch/powerpc/kernel/machine_kexec_64.c | 5 +++--
arch/powerpc/kernel/vdso.c | 3 ++-
arch/powerpc/kernel/vdso32/vdso32_wrapper.S | 3 ++-
arch/powerpc/kernel/vdso64/vdso64_wrapper.S | 3 ++-
arch/s390/kernel/init_task.c | 5 ++---
arch/s390/kernel/vdso.c | 2 +-
arch/s390/kernel/vdso32/vdso32_wrapper.S | 3 ++-
arch/s390/kernel/vdso64/vdso64_wrapper.S | 3 ++-
arch/sh/kernel/init_task.c | 5 ++---
arch/sh/kernel/irq.c | 6 ++----
arch/sparc/kernel/init_task.c | 5 ++---
arch/um/kernel/init_task.c | 5 ++---
arch/x86/include/asm/cache.h | 4 +++-
arch/x86/kernel/head_32.S | 4 ++--
arch/x86/kernel/head_64.S | 2 +-
arch/x86/kernel/init_task.c | 5 ++---
arch/xtensa/kernel/head.S | 2 +-
arch/xtensa/kernel/init_task.c | 5 ++---
include/linux/linkage.h | 2 ++
scripts/Makefile.build | 3 ++-
36 files changed, 69 insertions(+), 86 deletions(-)


2009-09-09 02:51:45

by Tim Abbott

[permalink] [raw]
Subject: [PATCH v2 1/5] kbuild: Don't define ALIGN and ENTRY when preprocessing linker scripts.

Adding a reference to <linux/linkage.h> to x86's <asm/cache.h> causes
the x86 linker script to have syntax errors, because the ALIGN and
ENTRY keywords get redefined to the assembly implementations of those.
One could fix this by adjusting the include structure, but I think any
solution based on that approach would be fragile.

Currently, it is impossible when writing a header to do something
different for assembly files and linker scripts, even though there are
clearly cases where one wants them to define macros differently for
the two (ENTRY being an excellent example). So I think the right
solution here is to introduce a new preprocessor definition,
tentatively called __LINKER_SCRIPT__ that is set along with
__ASSEMBLY__ for linker scripts, and to use that to not define ALIGN
and ENTRY in linker scripts. I suspect we'll find other uses for this
mechanism in the future.

Signed-off-by: Tim Abbott <[email protected]>
Cc: Sam Ravnborg <[email protected]>
---
include/linux/linkage.h | 2 ++
scripts/Makefile.build | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index 691f591..be874bb 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -57,6 +57,7 @@

#ifdef __ASSEMBLY__

+#ifndef __LINKER_SCRIPT__
#define ALIGN __ALIGN
#define ALIGN_STR __ALIGN_STR

@@ -66,6 +67,7 @@
ALIGN; \
name:
#endif
+#endif /* __LINKER_SCRIPT__ */

#ifndef WEAK
#define WEAK(name) \
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5c4b7a4..e51e213 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -269,7 +269,8 @@ targets += $(extra-y) $(MAKECMDGOALS) $(always)
# Linker scripts preprocessor (.lds.S -> .lds)
# ---------------------------------------------------------------------------
quiet_cmd_cpp_lds_S = LDS $@
- cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -o $@ $<
+ cmd_cpp_lds_S = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -D__LINKER_SCRIPT__ \
+ -o $@ $<

$(obj)/%.lds: $(src)/%.lds.S FORCE
$(call if_changed_dep,cpp_lds_S)
--
1.6.3.3

2009-09-09 02:49:25

by Tim Abbott

[permalink] [raw]
Subject: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

From: Joe Perches <[email protected]>

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Tim Abbott <[email protected]>

---
arch/arm/kernel/init_task.c | 5 ++---
arch/avr32/kernel/init_task.c | 5 ++---
arch/cris/kernel/process.c | 5 ++---
arch/frv/kernel/init_task.c | 5 ++---
arch/h8300/kernel/init_task.c | 5 ++---
arch/ia64/kernel/init_task.c | 3 ++-
arch/m32r/kernel/init_task.c | 5 ++---
arch/m68k/kernel/process.c | 6 +++---
arch/m68knommu/kernel/init_task.c | 5 ++---
arch/microblaze/kernel/init_task.c | 5 ++---
arch/mips/kernel/init_task.c | 5 ++---
arch/mn10300/kernel/init_task.c | 5 ++---
arch/parisc/kernel/init_task.c | 4 ++--
arch/powerpc/kernel/init_task.c | 5 ++---
arch/powerpc/kernel/machine_kexec_64.c | 5 +++--
arch/s390/kernel/init_task.c | 5 ++---
arch/sh/kernel/init_task.c | 5 ++---
arch/sparc/kernel/init_task.c | 5 ++---
arch/um/kernel/init_task.c | 5 ++---
arch/x86/kernel/init_task.c | 5 ++---
arch/xtensa/kernel/init_task.c | 5 ++---
21 files changed, 44 insertions(+), 59 deletions(-)

diff --git a/arch/arm/kernel/init_task.c b/arch/arm/kernel/init_task.c
index 3f47086..e7cbb50 100644
--- a/arch/arm/kernel/init_task.c
+++ b/arch/arm/kernel/init_task.c
@@ -24,9 +24,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
*
* The things we do for performance..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/avr32/kernel/init_task.c b/arch/avr32/kernel/init_task.c
index 57ec9f2..6b2343e 100644
--- a/arch/avr32/kernel/init_task.c
+++ b/arch/avr32/kernel/init_task.c
@@ -18,9 +18,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
/*
* Initial thread structure. Must be aligned on an 8192-byte boundary.
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/cris/kernel/process.c b/arch/cris/kernel/process.c
index 51dcd04..c99aeab 100644
--- a/arch/cris/kernel/process.c
+++ b/arch/cris/kernel/process.c
@@ -45,9 +45,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/frv/kernel/init_task.c b/arch/frv/kernel/init_task.c
index 1d3df1d..3c3e0b3 100644
--- a/arch/frv/kernel/init_task.c
+++ b/arch/frv/kernel/init_task.c
@@ -19,9 +19,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/h8300/kernel/init_task.c b/arch/h8300/kernel/init_task.c
index 089c65e..54c1062 100644
--- a/arch/h8300/kernel/init_task.c
+++ b/arch/h8300/kernel/init_task.c
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

diff --git a/arch/ia64/kernel/init_task.c b/arch/ia64/kernel/init_task.c
index c475fc2..e253ab8 100644
--- a/arch/ia64/kernel/init_task.c
+++ b/arch/ia64/kernel/init_task.c
@@ -33,7 +33,8 @@ union {
struct thread_info thread_info;
} s;
unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
-} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{
+} init_task_mem asm ("init_task") __init_task_data =
+ {{
.task = INIT_TASK(init_task_mem.s.task),
.thread_info = INIT_THREAD_INFO(init_task_mem.s.task)
}};
diff --git a/arch/m32r/kernel/init_task.c b/arch/m32r/kernel/init_task.c
index fce57e5..6c42d5f 100644
--- a/arch/m32r/kernel/init_task.c
+++ b/arch/m32r/kernel/init_task.c
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 72bad65..41230c5 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -42,9 +42,9 @@
*/
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-union thread_union init_thread_union
-__attribute__((section(".data.init_task"), aligned(THREAD_SIZE)))
- = { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data
+ __attribute__((aligned(THREAD_SIZE))) =
+ { INIT_THREAD_INFO(init_task) };

/* initial task structure */
struct task_struct init_task = INIT_TASK(init_task);
diff --git a/arch/m68knommu/kernel/init_task.c b/arch/m68knommu/kernel/init_task.c
index 45e97a2..cbf9dc3 100644
--- a/arch/m68knommu/kernel/init_task.c
+++ b/arch/m68knommu/kernel/init_task.c
@@ -31,7 +31,6 @@ EXPORT_SYMBOL(init_task);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

diff --git a/arch/microblaze/kernel/init_task.c b/arch/microblaze/kernel/init_task.c
index 67da225..b5d711f 100644
--- a/arch/microblaze/kernel/init_task.c
+++ b/arch/microblaze/kernel/init_task.c
@@ -19,9 +19,8 @@
static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);

-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
-{ INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

struct task_struct init_task = INIT_TASK(init_task);
EXPORT_SYMBOL(init_task);
diff --git a/arch/mips/kernel/init_task.c b/arch/mips/kernel/init_task.c
index 5b457a4..6d6ca53 100644
--- a/arch/mips/kernel/init_task.c
+++ b/arch/mips/kernel/init_task.c
@@ -21,9 +21,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
*
* The things we do for performance..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"),
- __aligned__(THREAD_SIZE))) =
+union thread_union init_thread_union __init_task_data
+ __attribute__((__aligned__(THREAD_SIZE))) =
{ INIT_THREAD_INFO(init_task) };

/*
diff --git a/arch/mn10300/kernel/init_task.c b/arch/mn10300/kernel/init_task.c
index 80d423b..a481b04 100644
--- a/arch/mn10300/kernel/init_task.c
+++ b/arch/mn10300/kernel/init_task.c
@@ -27,9 +27,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/parisc/kernel/init_task.c b/arch/parisc/kernel/init_task.c
index 82974b2..d020eae 100644
--- a/arch/parisc/kernel/init_task.c
+++ b/arch/parisc/kernel/init_task.c
@@ -43,8 +43,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((aligned(128))) __attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data
+ __attribute__((aligned(128))) =
{ INIT_THREAD_INFO(init_task) };

#if PT_NLEVELS == 3
diff --git a/arch/powerpc/kernel/init_task.c b/arch/powerpc/kernel/init_task.c
index ffc4253..2375b7e 100644
--- a/arch/powerpc/kernel/init_task.c
+++ b/arch/powerpc/kernel/init_task.c
@@ -16,9 +16,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 49e705f..040bd1d 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -13,6 +13,7 @@
#include <linux/kexec.h>
#include <linux/smp.h>
#include <linux/thread_info.h>
+#include <linux/init_task.h>
#include <linux/errno.h>

#include <asm/page.h>
@@ -249,8 +250,8 @@ static void kexec_prepare_cpus(void)
* We could use a smaller stack if we don't care about anything using
* current, but that audit has not been performed.
*/
-static union thread_union kexec_stack
- __attribute__((__section__(".data.init_task"))) = { };
+static union thread_union kexec_stack __init_task_data =
+ { };

/* Our assembly helper, in kexec_stub.S */
extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
diff --git a/arch/s390/kernel/init_task.c b/arch/s390/kernel/init_task.c
index fe787f9..4d1c9fb 100644
--- a/arch/s390/kernel/init_task.c
+++ b/arch/s390/kernel/init_task.c
@@ -25,9 +25,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/sh/kernel/init_task.c b/arch/sh/kernel/init_task.c
index 1719957..11f2ea5 100644
--- a/arch/sh/kernel/init_task.c
+++ b/arch/sh/kernel/init_task.c
@@ -17,9 +17,8 @@ struct pt_regs fake_swapper_regs;
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/sparc/kernel/init_task.c b/arch/sparc/kernel/init_task.c
index 28125c5..5fe3d65 100644
--- a/arch/sparc/kernel/init_task.c
+++ b/arch/sparc/kernel/init_task.c
@@ -18,6 +18,5 @@ EXPORT_SYMBOL(init_task);
* If this is not aligned on a 8k boundry, then you should change code
* in etrap.S which assumes it.
*/
-union thread_union init_thread_union
- __attribute__((section (".data.init_task")))
- = { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index b25121b..8aa77b6 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -30,9 +30,8 @@ EXPORT_SYMBOL(init_task);
* "init_task" linker map entry..
*/

-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

union thread_union cpu0_irqstack
__attribute__((__section__(".data.init_irqstack"))) =
diff --git a/arch/x86/kernel/init_task.c b/arch/x86/kernel/init_task.c
index 270ff83..3a54dcb 100644
--- a/arch/x86/kernel/init_task.c
+++ b/arch/x86/kernel/init_task.c
@@ -20,9 +20,8 @@ static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

/*
* Initial task structure.
diff --git a/arch/xtensa/kernel/init_task.c b/arch/xtensa/kernel/init_task.c
index c4302f0..cd122fb 100644
--- a/arch/xtensa/kernel/init_task.c
+++ b/arch/xtensa/kernel/init_task.c
@@ -23,9 +23,8 @@

static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
-{ INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

struct task_struct init_task = INIT_TASK(init_task);

--
1.6.3.3

2009-09-09 02:49:44

by Tim Abbott

[permalink] [raw]
Subject: [PATCH v2 3/5] Use macros for .bss.page_aligned section.

This patch changes the remaining direct references to
.bss.page_aligned in C and assembly code to use the macros in
include/linux/linkage.h.

Signed-off-by: Tim Abbott <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Paul Mundt <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: Sam Ravnborg <[email protected]>
---
arch/sh/kernel/irq.c | 6 ++----
arch/x86/kernel/head_32.S | 2 +-
arch/x86/kernel/head_64.S | 2 +-
arch/xtensa/kernel/head.S | 2 +-
4 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c
index 3d09062..e8f31a5 100644
--- a/arch/sh/kernel/irq.c
+++ b/arch/sh/kernel/irq.c
@@ -182,11 +182,9 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
}

#ifdef CONFIG_IRQSTACKS
-static char softirq_stack[NR_CPUS * THREAD_SIZE]
- __attribute__((__section__(".bss.page_aligned")));
+static char softirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;

-static char hardirq_stack[NR_CPUS * THREAD_SIZE]
- __attribute__((__section__(".bss.page_aligned")));
+static char hardirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss;

/*
* allocate per-cpu stacks for hardirq and for softirq processing
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index cc827ac..d41beee 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -608,7 +608,7 @@ ENTRY(initial_code)
/*
* BSS section
*/
-.section ".bss.page_aligned","wa"
+__PAGE_ALIGNED_BSS
.align PAGE_SIZE_asm
#ifdef CONFIG_X86_PAE
swapper_pg_pmd:
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index fa54f78..d0bc0a1 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -418,7 +418,7 @@ ENTRY(phys_base)
ENTRY(idt_table)
.skip IDT_ENTRIES * 16

- .section .bss.page_aligned, "aw", @nobits
+ __PAGE_ALIGNED_BSS
.align PAGE_SIZE
ENTRY(empty_zero_page)
.skip PAGE_SIZE
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index d9ddc1b..d215adc 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -235,7 +235,7 @@ should_never_return:
* BSS section
*/

-.section ".bss.page_aligned", "w"
+__PAGE_ALIGNED_BSS
#ifdef CONFIG_MMU
ENTRY(swapper_pg_dir)
.fill PAGE_SIZE, 1, 0
--
1.6.3.3

2009-09-09 02:49:28

by Tim Abbott

[permalink] [raw]
Subject: [PATCH v2 4/5] powerpc: remove unused __page_aligned definition.

There is already an architecture-independent __page_aligned_data macro
for this purpose, so removing the powerpc-specific macro should be
harmless.

Signed-off-by: Tim Abbott <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Sam Ravnborg <[email protected]>
---
arch/powerpc/include/asm/page_64.h | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
index 5817a3b..22e4795 100644
--- a/arch/powerpc/include/asm/page_64.h
+++ b/arch/powerpc/include/asm/page_64.h
@@ -152,14 +152,6 @@ do { \

#endif /* !CONFIG_HUGETLB_PAGE */

-#ifdef MODULE
-#define __page_aligned __attribute__((__aligned__(PAGE_SIZE)))
-#else
-#define __page_aligned \
- __attribute__((__aligned__(PAGE_SIZE), \
- __section__(".data.page_aligned")))
-#endif
-
#define VM_DATA_DEFAULT_FLAGS \
(test_thread_flag(TIF_32BIT) ? \
VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEFAULT_FLAGS64)
--
1.6.3.3

2009-09-09 02:49:49

by Tim Abbott

[permalink] [raw]
Subject: [PATCH v2 5/5] Use macros for .data.page_aligned section.

This patch changes the remaining direct references to
.data.page_aligned in C and assembly code to use the macros in
include/linux/linkage.h.

Signed-off-by: Tim Abbott <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Haavard Skinnemoen <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Sam Ravnborg <[email protected]>
---
arch/avr32/mm/init.c | 4 +---
arch/powerpc/kernel/vdso.c | 3 ++-
arch/powerpc/kernel/vdso32/vdso32_wrapper.S | 3 ++-
arch/powerpc/kernel/vdso64/vdso64_wrapper.S | 3 ++-
arch/s390/kernel/vdso.c | 2 +-
arch/s390/kernel/vdso32/vdso32_wrapper.S | 3 ++-
arch/s390/kernel/vdso64/vdso64_wrapper.S | 3 ++-
arch/x86/include/asm/cache.h | 4 +++-
arch/x86/kernel/head_32.S | 2 +-
9 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/arch/avr32/mm/init.c b/arch/avr32/mm/init.c
index e819fa6..cc60d10 100644
--- a/arch/avr32/mm/init.c
+++ b/arch/avr32/mm/init.c
@@ -24,11 +24,9 @@
#include <asm/setup.h>
#include <asm/sections.h>

-#define __page_aligned __attribute__((section(".data.page_aligned")))
-
DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);

-pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned;
+pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned_data;

struct page *empty_zero_page;
EXPORT_SYMBOL(empty_zero_page);
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index ad06d5c..f075591 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -1,3 +1,4 @@
+
/*
* Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
* <[email protected]>
@@ -74,7 +75,7 @@ static int vdso_ready;
static union {
struct vdso_data data;
u8 page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(".data.page_aligned")));
+} vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = &vdso_data_store.data;

/* Format of the patch table */
diff --git a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
index 556f0ca..6e8f507 100644
--- a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
#include <linux/init.h>
+#include <linux/linkage.h>
#include <asm/page.h>

- .section ".data.page_aligned"
+ __PAGE_ALIGNED_DATA

.globl vdso32_start, vdso32_end
.balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
index 0529cb9..b8553d6 100644
--- a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
#include <linux/init.h>
+#include <linux/linkage.h>
#include <asm/page.h>

- .section ".data.page_aligned"
+ __PAGE_ALIGNED_DATA

.globl vdso64_start, vdso64_end
.balign PAGE_SIZE
diff --git a/arch/s390/kernel/vdso.c b/arch/s390/kernel/vdso.c
index 45e1708..45a3e9a 100644
--- a/arch/s390/kernel/vdso.c
+++ b/arch/s390/kernel/vdso.c
@@ -75,7 +75,7 @@ __setup("vdso=", vdso_setup);
static union {
struct vdso_data data;
u8 page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(".data.page_aligned")));
+} vdso_data_store __page_aligned_data;
struct vdso_data *vdso_data = &vdso_data_store.data;

/*
diff --git a/arch/s390/kernel/vdso32/vdso32_wrapper.S b/arch/s390/kernel/vdso32/vdso32_wrapper.S
index 61639a8..ae42f8c 100644
--- a/arch/s390/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/s390/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
#include <linux/init.h>
+#include <linux/linkage.h>
#include <asm/page.h>

- .section ".data.page_aligned"
+ __PAGE_ALIGNED_DATA

.globl vdso32_start, vdso32_end
.balign PAGE_SIZE
diff --git a/arch/s390/kernel/vdso64/vdso64_wrapper.S b/arch/s390/kernel/vdso64/vdso64_wrapper.S
index d8e2ac1..c245842 100644
--- a/arch/s390/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/s390/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
#include <linux/init.h>
+#include <linux/linkage.h>
#include <asm/page.h>

- .section ".data.page_aligned"
+ __PAGE_ALIGNED_DATA

.globl vdso64_start, vdso64_end
.balign PAGE_SIZE
diff --git a/arch/x86/include/asm/cache.h b/arch/x86/include/asm/cache.h
index 5d367ca..549860d 100644
--- a/arch/x86/include/asm/cache.h
+++ b/arch/x86/include/asm/cache.h
@@ -1,6 +1,8 @@
#ifndef _ASM_X86_CACHE_H
#define _ASM_X86_CACHE_H

+#include <linux/linkage.h>
+
/* L1 cache line size */
#define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT)
#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
@@ -13,7 +15,7 @@
#ifdef CONFIG_SMP
#define __cacheline_aligned_in_smp \
__attribute__((__aligned__(1 << (INTERNODE_CACHE_SHIFT)))) \
- __attribute__((__section__(".data.page_aligned")))
+ __page_aligned_data
#endif
#endif

diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index d41beee..3eba3ab 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -626,7 +626,7 @@ ENTRY(empty_zero_page)
* This starts the data section.
*/
#ifdef CONFIG_X86_PAE
-.section ".data.page_aligned","wa"
+__PAGE_ALIGNED_DATA
/* Page-aligned for the benefit of paravirt? */
.align PAGE_SIZE_asm
ENTRY(swapper_pg_dir)
--
1.6.3.3

2009-09-09 02:54:40

by Paul Mundt

[permalink] [raw]
Subject: Re: [PATCH v2 3/5] Use macros for .bss.page_aligned section.

On Tue, Sep 08, 2009 at 10:49:04PM -0400, Tim Abbott wrote:
> This patch changes the remaining direct references to
> .bss.page_aligned in C and assembly code to use the macros in
> include/linux/linkage.h.
>
> Signed-off-by: Tim Abbott <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: H. Peter Anvin <[email protected]>
> Cc: Paul Mundt <[email protected]>
> Cc: Chris Zankel <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> ---
> arch/sh/kernel/irq.c | 6 ++----
> arch/x86/kernel/head_32.S | 2 +-
> arch/x86/kernel/head_64.S | 2 +-
> arch/xtensa/kernel/head.S | 2 +-
> 4 files changed, 5 insertions(+), 7 deletions(-)
>
Acked-by: Paul Mundt <[email protected]>

2009-09-09 02:55:11

by Paul Mundt

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, Sep 08, 2009 at 10:49:03PM -0400, Tim Abbott wrote:
> From: Joe Perches <[email protected]>
>
> Signed-off-by: Joe Perches <[email protected]>
> Signed-off-by: Tim Abbott <[email protected]>
>
> ---
> arch/arm/kernel/init_task.c | 5 ++---
> arch/avr32/kernel/init_task.c | 5 ++---
> arch/cris/kernel/process.c | 5 ++---
> arch/frv/kernel/init_task.c | 5 ++---
> arch/h8300/kernel/init_task.c | 5 ++---
> arch/ia64/kernel/init_task.c | 3 ++-
> arch/m32r/kernel/init_task.c | 5 ++---
> arch/m68k/kernel/process.c | 6 +++---
> arch/m68knommu/kernel/init_task.c | 5 ++---
> arch/microblaze/kernel/init_task.c | 5 ++---
> arch/mips/kernel/init_task.c | 5 ++---
> arch/mn10300/kernel/init_task.c | 5 ++---
> arch/parisc/kernel/init_task.c | 4 ++--
> arch/powerpc/kernel/init_task.c | 5 ++---
> arch/powerpc/kernel/machine_kexec_64.c | 5 +++--
> arch/s390/kernel/init_task.c | 5 ++---
> arch/sh/kernel/init_task.c | 5 ++---
> arch/sparc/kernel/init_task.c | 5 ++---
> arch/um/kernel/init_task.c | 5 ++---
> arch/x86/kernel/init_task.c | 5 ++---
> arch/xtensa/kernel/init_task.c | 5 ++---
> 21 files changed, 44 insertions(+), 59 deletions(-)
>
Acked-by: Paul Mundt <[email protected]>

2009-09-09 02:57:58

by Daniel Walker

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> +union thread_union init_thread_union __init_task_data =
> + { INIT_THREAD_INFO(init_task) };


All the lines like the above are all producing checkpatch errors.. It
looks like the open brace needs to be up with the equals ..

Daniel

2009-09-09 03:03:37

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 19:58 -0700, Daniel Walker wrote:
> On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> > +union thread_union init_thread_union __init_task_data =
> > + { INIT_THREAD_INFO(init_task) };
> All the lines like the above are all producing checkpatch errors.. It
> looks like the open brace needs to be up with the equals ..

Some checkpatch errors are ignorable.
checkpatch output is a guide, not a rule.

cheers, Joe

2009-09-09 03:06:44

by Daniel Walker

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 20:03 -0700, Joe Perches wrote:
> On Tue, 2009-09-08 at 19:58 -0700, Daniel Walker wrote:
> > On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> > > +union thread_union init_thread_union __init_task_data =
> > > + { INIT_THREAD_INFO(init_task) };
> > All the lines like the above are all producing checkpatch errors.. It
> > looks like the open brace needs to be up with the equals ..
>
> Some checkpatch errors are ignorable.
> checkpatch output is a guide, not a rule.

Not errors, those aren't usually ignorable .. Warnings, those could be..

Daniel

2009-09-09 03:10:00

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 20:07 -0700, Daniel Walker wrote:
> On Tue, 2009-09-08 at 20:03 -0700, Joe Perches wrote:
> > On Tue, 2009-09-08 at 19:58 -0700, Daniel Walker wrote:
> > > On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> > > > +union thread_union init_thread_union __init_task_data =
> > > > + { INIT_THREAD_INFO(init_task) };
> > > All the lines like the above are all producing checkpatch errors.. It
> > > looks like the open brace needs to be up with the equals ..
> > Some checkpatch errors are ignorable.
> > checkpatch output is a guide, not a rule.
>
> Not errors, those aren't usually ignorable .. Warnings, those could be..

Shrug. So submit a patch...

cheers, Joe

2009-09-09 03:21:03

by Daniel Walker

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 20:10 -0700, Joe Perches wrote:
> On Tue, 2009-09-08 at 20:07 -0700, Daniel Walker wrote:
> > On Tue, 2009-09-08 at 20:03 -0700, Joe Perches wrote:
> > > On Tue, 2009-09-08 at 19:58 -0700, Daniel Walker wrote:
> > > > On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> > > > > +union thread_union init_thread_union __init_task_data =
> > > > > + { INIT_THREAD_INFO(init_task) };
> > > > All the lines like the above are all producing checkpatch errors.. It
> > > > looks like the open brace needs to be up with the equals ..
> > > Some checkpatch errors are ignorable.
> > > checkpatch output is a guide, not a rule.
> >
> > Not errors, those aren't usually ignorable .. Warnings, those could be..
>
> Shrug. So submit a patch...

I would if this was code in the kernel already, but it's not. LKML
submission is the process people use to find these types of issues.
Issues that should be fixed prior to inclusion, and may have been
overlooked..

Daniel

2009-09-09 03:31:59

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 20:21 -0700, Daniel Walker wrote:
> On Tue, 2009-09-08 at 20:10 -0700, Joe Perches wrote:
> > Shrug. So submit a patch...
> I would if this was code in the kernel already, but it's not. LKML
> submission is the process people use to find these types of issues.
> Issues that should be fixed prior to inclusion, and may have been
> overlooked..

I think you should look at the patch again, and
perhaps not react what appears perhaps mindlessly.

Here's an example:

-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
- { INIT_THREAD_INFO(init_task) };
+union thread_union init_thread_union __init_task_data =
+ { INIT_THREAD_INFO(init_task) };

cheers, Joe

2009-09-09 03:32:42

by Paul Mundt

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, Sep 08, 2009 at 08:21:22PM -0700, Daniel Walker wrote:
> On Tue, 2009-09-08 at 20:10 -0700, Joe Perches wrote:
> > On Tue, 2009-09-08 at 20:07 -0700, Daniel Walker wrote:
> > > On Tue, 2009-09-08 at 20:03 -0700, Joe Perches wrote:
> > > > On Tue, 2009-09-08 at 19:58 -0700, Daniel Walker wrote:
> > > > > On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> > > > > > +union thread_union init_thread_union __init_task_data =
> > > > > > + { INIT_THREAD_INFO(init_task) };
> > > > > All the lines like the above are all producing checkpatch errors.. It
> > > > > looks like the open brace needs to be up with the equals ..
> > > > Some checkpatch errors are ignorable.
> > > > checkpatch output is a guide, not a rule.
> > >
> > > Not errors, those aren't usually ignorable .. Warnings, those could be..
> >
> > Shrug. So submit a patch...
>
> I would if this was code in the kernel already, but it's not. LKML
> submission is the process people use to find these types of issues.
> Issues that should be fixed prior to inclusion, and may have been
> overlooked..
>
Did you even bother reading the patch? This is exactly the format that is
in the kernel today (and even predates checkpatch), it's just that
checkpatch doesn't presently complain about it due to how the section
parsing is done. If you move the section annotation down to a separate
line, it also silences checkpatch. In this case, checkpatch is simply
broken and can be ignored. Stylistic "errors" are complete nonsense.

2009-09-09 03:43:41

by Daniel Walker

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 20:31 -0700, Joe Perches wrote:
> On Tue, 2009-09-08 at 20:21 -0700, Daniel Walker wrote:
> > On Tue, 2009-09-08 at 20:10 -0700, Joe Perches wrote:
> > > Shrug. So submit a patch...
> > I would if this was code in the kernel already, but it's not. LKML
> > submission is the process people use to find these types of issues.
> > Issues that should be fixed prior to inclusion, and may have been
> > overlooked..
>
> I think you should look at the patch again, and
> perhaps not react what appears perhaps mindlessly.
>

It does little good to argue with me.. Ultimately your "clean up" isn't
clean, and that makes it not such a good choice for mainline inclusion.

Daniel

2009-09-09 03:49:26

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Tue, 2009-09-08 at 20:44 -0700, Daniel Walker wrote:
> It does little good to argue with me..

We agree. That's great. cheers, Joe


2009-09-09 04:11:13

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH v2 2/5] Use new __init_task_data macro in arch init_task.c files.

On Wed, Sep 09, 2009 at 12:32:38PM +0900, Paul Mundt wrote:
> On Tue, Sep 08, 2009 at 08:21:22PM -0700, Daniel Walker wrote:
> > On Tue, 2009-09-08 at 20:10 -0700, Joe Perches wrote:
> > > On Tue, 2009-09-08 at 20:07 -0700, Daniel Walker wrote:
> > > > On Tue, 2009-09-08 at 20:03 -0700, Joe Perches wrote:
> > > > > On Tue, 2009-09-08 at 19:58 -0700, Daniel Walker wrote:
> > > > > > On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> > > > > > > +union thread_union init_thread_union __init_task_data =
> > > > > > > + { INIT_THREAD_INFO(init_task) };
> > > > > > All the lines like the above are all producing checkpatch errors.. It
> > > > > > looks like the open brace needs to be up with the equals ..
> > > > > Some checkpatch errors are ignorable.
> > > > > checkpatch output is a guide, not a rule.
> > > >
> > > > Not errors, those aren't usually ignorable .. Warnings, those could be..
> > >
> > > Shrug. So submit a patch...
> >
> > I would if this was code in the kernel already, but it's not. LKML
> > submission is the process people use to find these types of issues.
> > Issues that should be fixed prior to inclusion, and may have been
> > overlooked..
> >
> Did you even bother reading the patch? This is exactly the format that is
> in the kernel today (and even predates checkpatch), it's just that
> checkpatch doesn't presently complain about it due to how the section
> parsing is done. If you move the section annotation down to a separate
> line, it also silences checkpatch. In this case, checkpatch is simply
> broken and can be ignored. Stylistic "errors" are complete nonsense.

The

struct data_struct var_name __section_decoration = {
initializator,
};

is a canonical format for the kernel though so if somebody feels
strongly about being "checkpatch clean" he can post a follow-up
patch ;)

--
Dmitry

2009-09-11 07:33:46

by Benjamin Herrenschmidt

[permalink] [raw]
Subject: Re: [PATCH v2 4/5] powerpc: remove unused __page_aligned definition.

On Tue, 2009-09-08 at 22:49 -0400, Tim Abbott wrote:
> There is already an architecture-independent __page_aligned_data macro
> for this purpose, so removing the powerpc-specific macro should be
> harmless.

Thanks. I'll pick these up.

Cheers,
Ben.

> Signed-off-by: Tim Abbott <[email protected]>
> Cc: Benjamin Herrenschmidt <[email protected]>
> Cc: Paul Mackerras <[email protected]>
> Cc: Sam Ravnborg <[email protected]>
> ---
> arch/powerpc/include/asm/page_64.h | 8 --------
> 1 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/page_64.h b/arch/powerpc/include/asm/page_64.h
> index 5817a3b..22e4795 100644
> --- a/arch/powerpc/include/asm/page_64.h
> +++ b/arch/powerpc/include/asm/page_64.h
> @@ -152,14 +152,6 @@ do { \
>
> #endif /* !CONFIG_HUGETLB_PAGE */
>
> -#ifdef MODULE
> -#define __page_aligned __attribute__((__aligned__(PAGE_SIZE)))
> -#else
> -#define __page_aligned \
> - __attribute__((__aligned__(PAGE_SIZE), \
> - __section__(".data.page_aligned")))
> -#endif
> -
> #define VM_DATA_DEFAULT_FLAGS \
> (test_thread_flag(TIF_32BIT) ? \
> VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEFAULT_FLAGS64)