diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 12 | ||||
-rw-r--r-- | include/linux/init_task.h | 3 | ||||
-rw-r--r-- | include/linux/linkage.h | 9 |
3 files changed, 18 insertions, 6 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index dccdbed05848..a553f1041cf1 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -191,7 +191,7 @@ | |||
191 | . = ALIGN(align); \ | 191 | . = ALIGN(align); \ |
192 | *(.data.cacheline_aligned) | 192 | *(.data.cacheline_aligned) |
193 | 193 | ||
194 | #define INIT_TASK(align) \ | 194 | #define INIT_TASK_DATA(align) \ |
195 | . = ALIGN(align); \ | 195 | . = ALIGN(align); \ |
196 | *(.data.init_task) | 196 | *(.data.init_task) |
197 | 197 | ||
@@ -434,10 +434,10 @@ | |||
434 | /* | 434 | /* |
435 | * Init task | 435 | * Init task |
436 | */ | 436 | */ |
437 | #define INIT_TASK_DATA(align) \ | 437 | #define INIT_TASK_DATA_SECTION(align) \ |
438 | . = ALIGN(align); \ | 438 | . = ALIGN(align); \ |
439 | .data.init_task : { \ | 439 | .data.init_task : { \ |
440 | INIT_TASK \ | 440 | INIT_TASK_DATA(align) \ |
441 | } | 441 | } |
442 | 442 | ||
443 | #ifdef CONFIG_CONSTRUCTORS | 443 | #ifdef CONFIG_CONSTRUCTORS |
@@ -705,15 +705,15 @@ | |||
705 | * matches the requirment of PAGE_ALIGNED_DATA. | 705 | * matches the requirment of PAGE_ALIGNED_DATA. |
706 | * | 706 | * |
707 | * use 0 as page_align if page_aligned data is not used */ | 707 | * use 0 as page_align if page_aligned data is not used */ |
708 | #define RW_DATA_SECTION(cacheline, nosave, pagealigned, inittask) \ | 708 | #define RW_DATA_SECTION(cacheline, pagealigned, inittask) \ |
709 | . = ALIGN(PAGE_SIZE); \ | 709 | . = ALIGN(PAGE_SIZE); \ |
710 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ | 710 | .data : AT(ADDR(.data) - LOAD_OFFSET) { \ |
711 | INIT_TASK(inittask) \ | 711 | INIT_TASK_DATA(inittask) \ |
712 | CACHELINE_ALIGNED_DATA(cacheline) \ | 712 | CACHELINE_ALIGNED_DATA(cacheline) \ |
713 | READ_MOSTLY_DATA(cacheline) \ | 713 | READ_MOSTLY_DATA(cacheline) \ |
714 | DATA_DATA \ | 714 | DATA_DATA \ |
715 | CONSTRUCTORS \ | 715 | CONSTRUCTORS \ |
716 | NOSAVE_DATA(nosave) \ | 716 | NOSAVE_DATA \ |
717 | PAGE_ALIGNED_DATA(pagealigned) \ | 717 | PAGE_ALIGNED_DATA(pagealigned) \ |
718 | } | 718 | } |
719 | 719 | ||
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 5368fbdc7801..7fc01b13be43 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -183,5 +183,8 @@ extern struct cred init_cred; | |||
183 | LIST_HEAD_INIT(cpu_timers[2]), \ | 183 | LIST_HEAD_INIT(cpu_timers[2]), \ |
184 | } | 184 | } |
185 | 185 | ||
186 | /* Attach to the init_task data structure for proper alignment */ | ||
187 | #define __init_task_data __attribute__((__section__(".data.init_task"))) | ||
188 | |||
186 | 189 | ||
187 | #endif | 190 | #endif |
diff --git a/include/linux/linkage.h b/include/linux/linkage.h index fee9e59649c1..691f59171c6c 100644 --- a/include/linux/linkage.h +++ b/include/linux/linkage.h | |||
@@ -22,6 +22,15 @@ | |||
22 | #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) | 22 | #define __page_aligned_bss __section(.bss.page_aligned) __aligned(PAGE_SIZE) |
23 | 23 | ||
24 | /* | 24 | /* |
25 | * For assembly routines. | ||
26 | * | ||
27 | * Note when using these that you must specify the appropriate | ||
28 | * alignment directives yourself | ||
29 | */ | ||
30 | #define __PAGE_ALIGNED_DATA .section ".data.page_aligned", "aw" | ||
31 | #define __PAGE_ALIGNED_BSS .section ".bss.page_aligned", "aw" | ||
32 | |||
33 | /* | ||
25 | * This is used by architectures to keep arguments on the stack | 34 | * This is used by architectures to keep arguments on the stack |
26 | * untouched by the compiler by keeping them live until the end. | 35 | * untouched by the compiler by keeping them live until the end. |
27 | * The argument stack may be owned by the assembly-language | 36 | * The argument stack may be owned by the assembly-language |