aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-10-12 10:11:50 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2007-10-12 10:13:10 -0400
commit52480ee5206a3fe3a61b5529ce063202c60b8b27 (patch)
tree8bc71c234f0ca63022327b10cbd627ea3762ad0c
parente16af09d76ac3322e26f5b3ff49979691f350c12 (diff)
[S390] s390: use PAGE_SIZE in vmlinux.lds
Replace the hardcoded 4096 value with the PAGE_SIZE macro. Converted a few decimal numbers to readable hex numbers. Use of PAGE_SIZE required a small change to page.h to allow PAGE_SIZE to be used from assembler/linker scripts. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/vmlinux.lds.S27
-rw-r--r--include/asm-s390/page.h3
2 files changed, 16 insertions, 14 deletions
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index f6b16aec32e7..849120e3e28a 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -2,6 +2,7 @@
2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com) 2 * Written by Martin Schwidefsky (schwidefsky@de.ibm.com)
3 */ 3 */
4 4
5#include <asm/page.h>
5#include <asm-generic/vmlinux.lds.h> 6#include <asm-generic/vmlinux.lds.h>
6 7
7#ifndef CONFIG_64BIT 8#ifndef CONFIG_64BIT
@@ -35,10 +36,10 @@ SECTIONS
35 RODATA 36 RODATA
36 37
37#ifdef CONFIG_SHARED_KERNEL 38#ifdef CONFIG_SHARED_KERNEL
38 . = ALIGN(1048576); /* VM shared segments are 1MB aligned */ 39 . = ALIGN(0x100000); /* VM shared segments are 1MB aligned */
39#endif 40#endif
40 41
41 . = ALIGN(4096); 42 . = ALIGN(PAGE_SIZE);
42 _eshared = .; /* End of shareable data */ 43 _eshared = .; /* End of shareable data */
43 44
44 . = ALIGN(16); /* Exception table */ 45 . = ALIGN(16); /* Exception table */
@@ -56,37 +57,37 @@ SECTIONS
56 CONSTRUCTORS 57 CONSTRUCTORS
57 } 58 }
58 59
59 . = ALIGN(4096); 60 . = ALIGN(PAGE_SIZE);
60 .data_nosave : { 61 .data_nosave : {
61 __nosave_begin = .; 62 __nosave_begin = .;
62 *(.data.nosave) 63 *(.data.nosave)
63 } 64 }
64 . = ALIGN(4096); 65 . = ALIGN(PAGE_SIZE);
65 __nosave_end = .; 66 __nosave_end = .;
66 67
67 . = ALIGN(4096); 68 . = ALIGN(PAGE_SIZE);
68 .data.page_aligned : { 69 .data.page_aligned : {
69 *(.data.idt) 70 *(.data.idt)
70 } 71 }
71 72
72 . = ALIGN(256); 73 . = ALIGN(0x100);
73 .data.cacheline_aligned : { 74 .data.cacheline_aligned : {
74 *(.data.cacheline_aligned) 75 *(.data.cacheline_aligned)
75 } 76 }
76 77
77 . = ALIGN(256); 78 . = ALIGN(0x100);
78 .data.read_mostly : { 79 .data.read_mostly : {
79 *(.data.read_mostly) 80 *(.data.read_mostly)
80 } 81 }
81 _edata = .; /* End of data section */ 82 _edata = .; /* End of data section */
82 83
83 . = ALIGN(8192); /* init_task */ 84 . = ALIGN(2 * PAGE_SIZE); /* init_task */
84 .data.init_task : { 85 .data.init_task : {
85 *(.data.init_task) 86 *(.data.init_task)
86 } 87 }
87 88
88 /* will be freed after init */ 89 /* will be freed after init */
89 . = ALIGN(4096); /* Init code and data */ 90 . = ALIGN(PAGE_SIZE); /* Init code and data */
90 __init_begin = .; 91 __init_begin = .;
91 .init.text : { 92 .init.text : {
92 _sinittext = .; 93 _sinittext = .;
@@ -104,7 +105,7 @@ SECTIONS
104 .init.data : { 105 .init.data : {
105 *(.init.data) 106 *(.init.data)
106 } 107 }
107 . = ALIGN(256); 108 . = ALIGN(0x100);
108 .init.setup : { 109 .init.setup : {
109 __setup_start = .; 110 __setup_start = .;
110 *(.init.setup) 111 *(.init.setup)
@@ -124,7 +125,7 @@ SECTIONS
124 SECURITY_INIT 125 SECURITY_INIT
125 126
126#ifdef CONFIG_BLK_DEV_INITRD 127#ifdef CONFIG_BLK_DEV_INITRD
127 . = ALIGN(256); 128 . = ALIGN(0x100);
128 .init.ramfs : { 129 .init.ramfs : {
129 __initramfs_start = .; 130 __initramfs_start = .;
130 *(.init.ramfs) 131 *(.init.ramfs)
@@ -133,8 +134,8 @@ SECTIONS
133 } 134 }
134#endif 135#endif
135 136
136 PERCPU(4096) 137 PERCPU(PAGE_SIZE)
137 . = ALIGN(4096); 138 . = ALIGN(PAGE_SIZE);
138 __init_end = .; /* freed after init ends here */ 139 __init_end = .; /* freed after init ends here */
139 140
140 /* BSS */ 141 /* BSS */
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h
index f326451ed6ec..ceec3826a67c 100644
--- a/include/asm-s390/page.h
+++ b/include/asm-s390/page.h
@@ -9,11 +9,12 @@
9#ifndef _S390_PAGE_H 9#ifndef _S390_PAGE_H
10#define _S390_PAGE_H 10#define _S390_PAGE_H
11 11
12#include <linux/const.h>
12#include <asm/types.h> 13#include <asm/types.h>
13 14
14/* PAGE_SHIFT determines the page size */ 15/* PAGE_SHIFT determines the page size */
15#define PAGE_SHIFT 12 16#define PAGE_SHIFT 12
16#define PAGE_SIZE (1UL << PAGE_SHIFT) 17#define PAGE_SIZE (_AC(1,UL) << PAGE_SHIFT)
17#define PAGE_MASK (~(PAGE_SIZE-1)) 18#define PAGE_MASK (~(PAGE_SIZE-1))
18#define PAGE_DEFAULT_ACC 0 19#define PAGE_DEFAULT_ACC 0
19#define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4) 20#define PAGE_DEFAULT_KEY (PAGE_DEFAULT_ACC << 4)