diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-02-21 04:55:37 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-02-21 04:55:37 -0500 |
commit | 615b04b301fd4e1b7680a498b873c4ae9baad92f (patch) | |
tree | 8f6ad0f048507858cfbdfef3f2dee5c7cffe3bbe /arch | |
parent | 229d9c6dfb2900559449575a56dc8abcaf0bce9d (diff) |
[S390] nss: Free unused memory in kernel image.
With CONFIG_SHARED_KERNEL the kernel text segment that might be in a
read only memory sections starts at 1MB. Memory between 0x12000 and
0x100000 is unused then. Free this, so we have appr. an extra MB
of memory available.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/s390/kernel/head31.S | 15 | ||||
-rw-r--r-- | arch/s390/kernel/head64.S | 16 | ||||
-rw-r--r-- | arch/s390/kernel/ipl.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 7 |
4 files changed, 17 insertions, 28 deletions
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index 453fd3b4edea..da7c8bb80982 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S | |||
@@ -148,20 +148,9 @@ startup_continue: | |||
148 | .Lstartup_init: | 148 | .Lstartup_init: |
149 | .long startup_init | 149 | .long startup_init |
150 | 150 | ||
151 | .globl ipl_schib | ||
152 | ipl_schib: | ||
153 | .rept 13 | ||
154 | .long 0 | ||
155 | .endr | ||
156 | |||
157 | .globl ipl_flags | ||
158 | ipl_flags: | ||
159 | .long 0 | ||
160 | .globl ipl_devno | ||
161 | ipl_devno: | ||
162 | .word 0 | ||
163 | |||
164 | .org 0x12000 | 151 | .org 0x12000 |
152 | .globl _ehead | ||
153 | _ehead: | ||
165 | #ifdef CONFIG_SHARED_KERNEL | 154 | #ifdef CONFIG_SHARED_KERNEL |
166 | .org 0x100000 | 155 | .org 0x100000 |
167 | #endif | 156 | #endif |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index b8fec4e5c5d4..af09e18cc5d0 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -154,21 +154,9 @@ startup_continue: | |||
154 | .Lparmaddr: | 154 | .Lparmaddr: |
155 | .quad PARMAREA | 155 | .quad PARMAREA |
156 | 156 | ||
157 | .globl ipl_schib | ||
158 | ipl_schib: | ||
159 | .rept 13 | ||
160 | .long 0 | ||
161 | .endr | ||
162 | |||
163 | .globl ipl_flags | ||
164 | ipl_flags: | ||
165 | .long 0 | ||
166 | .globl ipl_devno | ||
167 | ipl_devno: | ||
168 | .word 0 | ||
169 | |||
170 | .org 0x12000 | 157 | .org 0x12000 |
171 | 158 | .globl _ehead | |
159 | _ehead: | ||
172 | #ifdef CONFIG_SHARED_KERNEL | 160 | #ifdef CONFIG_SHARED_KERNEL |
173 | .org 0x100000 | 161 | .org 0x100000 |
174 | #endif | 162 | #endif |
diff --git a/arch/s390/kernel/ipl.c b/arch/s390/kernel/ipl.c index ee6826a52d26..5a863a3bf10c 100644 --- a/arch/s390/kernel/ipl.c +++ b/arch/s390/kernel/ipl.c | |||
@@ -43,6 +43,13 @@ enum ipl_type { | |||
43 | #define IPL_FCP_STR "fcp" | 43 | #define IPL_FCP_STR "fcp" |
44 | #define IPL_NSS_STR "nss" | 44 | #define IPL_NSS_STR "nss" |
45 | 45 | ||
46 | /* | ||
47 | * Must be in data section since the bss section | ||
48 | * is not cleared when these are accessed. | ||
49 | */ | ||
50 | u16 ipl_devno __attribute__((__section__(".data"))) = 0; | ||
51 | u32 ipl_flags __attribute__((__section__(".data"))) = 0; | ||
52 | |||
46 | static char *ipl_type_str(enum ipl_type type) | 53 | static char *ipl_type_str(enum ipl_type type) |
47 | { | 54 | { |
48 | switch (type) { | 55 | switch (type) { |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index fced022dc58d..863c8d08c026 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -690,9 +690,14 @@ setup_memory(void) | |||
690 | psw_set_key(PAGE_DEFAULT_KEY); | 690 | psw_set_key(PAGE_DEFAULT_KEY); |
691 | 691 | ||
692 | free_bootmem_with_active_regions(0, max_pfn); | 692 | free_bootmem_with_active_regions(0, max_pfn); |
693 | reserve_bootmem(0, PFN_PHYS(start_pfn)); | ||
694 | 693 | ||
695 | /* | 694 | /* |
695 | * Reserve memory used for lowcore/command line/kernel image. | ||
696 | */ | ||
697 | reserve_bootmem(0, (unsigned long)_ehead); | ||
698 | reserve_bootmem((unsigned long)_stext, | ||
699 | PFN_PHYS(start_pfn) - (unsigned long)_stext); | ||
700 | /* | ||
696 | * Reserve the bootmem bitmap itself as well. We do this in two | 701 | * Reserve the bootmem bitmap itself as well. We do this in two |
697 | * steps (first step was init_bootmem()) because this catches | 702 | * steps (first step was init_bootmem()) because this catches |
698 | * the (very unlikely) case of us accidentally initializing the | 703 | * the (very unlikely) case of us accidentally initializing the |