diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-22 20:40:10 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:50:19 -0400 |
commit | bef1568d9714f1162086c32583ba7984a7ca8e3e (patch) | |
tree | 84cd1f6f1c5637cb3d22f66fa7fc51db4ae4a089 | |
parent | 90d967e0ef68f5312ed4b081d5c9312ff53c1c93 (diff) |
x86: move reservetop and vmalloc parsing to pgtable_32.c
also change reserve_top_address to __init attibute
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/setup_32.c | 33 | ||||
-rw-r--r-- | arch/x86/mm/pgtable_32.c | 35 |
2 files changed, 34 insertions, 34 deletions
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 13155009ce94..9a08490a3889 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -184,39 +184,6 @@ static inline void copy_edd(void) | |||
184 | } | 184 | } |
185 | #endif | 185 | #endif |
186 | 186 | ||
187 | /* | ||
188 | * vmalloc=size forces the vmalloc area to be exactly 'size' | ||
189 | * bytes. This can be used to increase (or decrease) the | ||
190 | * vmalloc area - the default is 128m. | ||
191 | */ | ||
192 | static int __init parse_vmalloc(char *arg) | ||
193 | { | ||
194 | if (!arg) | ||
195 | return -EINVAL; | ||
196 | |||
197 | __VMALLOC_RESERVE = memparse(arg, &arg); | ||
198 | return 0; | ||
199 | } | ||
200 | early_param("vmalloc", parse_vmalloc); | ||
201 | |||
202 | /* | ||
203 | * reservetop=size reserves a hole at the top of the kernel address space which | ||
204 | * a hypervisor can load into later. Needed for dynamically loaded hypervisors, | ||
205 | * so relocating the fixmap can be done before paging initialization. | ||
206 | */ | ||
207 | static int __init parse_reservetop(char *arg) | ||
208 | { | ||
209 | unsigned long address; | ||
210 | |||
211 | if (!arg) | ||
212 | return -EINVAL; | ||
213 | |||
214 | address = memparse(arg, &arg); | ||
215 | reserve_top_address(address); | ||
216 | return 0; | ||
217 | } | ||
218 | early_param("reservetop", parse_reservetop); | ||
219 | |||
220 | #ifdef CONFIG_BLK_DEV_INITRD | 187 | #ifdef CONFIG_BLK_DEV_INITRD |
221 | 188 | ||
222 | static bool do_relocate_initrd = false; | 189 | static bool do_relocate_initrd = false; |
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index 0662f345212f..828907d001e8 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -152,7 +152,7 @@ EXPORT_SYMBOL(__FIXADDR_TOP); | |||
152 | * Can be used to relocate the fixmap area and poke a hole in the top | 152 | * Can be used to relocate the fixmap area and poke a hole in the top |
153 | * of kernel address space to make room for a hypervisor. | 153 | * of kernel address space to make room for a hypervisor. |
154 | */ | 154 | */ |
155 | void reserve_top_address(unsigned long reserve) | 155 | void __init reserve_top_address(unsigned long reserve) |
156 | { | 156 | { |
157 | BUG_ON(fixmaps_set > 0); | 157 | BUG_ON(fixmaps_set > 0); |
158 | printk(KERN_INFO "Reserving virtual address space above 0x%08x\n", | 158 | printk(KERN_INFO "Reserving virtual address space above 0x%08x\n", |
@@ -160,3 +160,36 @@ void reserve_top_address(unsigned long reserve) | |||
160 | __FIXADDR_TOP = -reserve - PAGE_SIZE; | 160 | __FIXADDR_TOP = -reserve - PAGE_SIZE; |
161 | __VMALLOC_RESERVE += reserve; | 161 | __VMALLOC_RESERVE += reserve; |
162 | } | 162 | } |
163 | |||
164 | /* | ||
165 | * vmalloc=size forces the vmalloc area to be exactly 'size' | ||
166 | * bytes. This can be used to increase (or decrease) the | ||
167 | * vmalloc area - the default is 128m. | ||
168 | */ | ||
169 | static int __init parse_vmalloc(char *arg) | ||
170 | { | ||
171 | if (!arg) | ||
172 | return -EINVAL; | ||
173 | |||
174 | __VMALLOC_RESERVE = memparse(arg, &arg); | ||
175 | return 0; | ||
176 | } | ||
177 | early_param("vmalloc", parse_vmalloc); | ||
178 | |||
179 | /* | ||
180 | * reservetop=size reserves a hole at the top of the kernel address space which | ||
181 | * a hypervisor can load into later. Needed for dynamically loaded hypervisors, | ||
182 | * so relocating the fixmap can be done before paging initialization. | ||
183 | */ | ||
184 | static int __init parse_reservetop(char *arg) | ||
185 | { | ||
186 | unsigned long address; | ||
187 | |||
188 | if (!arg) | ||
189 | return -EINVAL; | ||
190 | |||
191 | address = memparse(arg, &arg); | ||
192 | reserve_top_address(address); | ||
193 | return 0; | ||
194 | } | ||
195 | early_param("reservetop", parse_reservetop); | ||