aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/e820_64.c
diff options
context:
space:
mode:
authorYinghai Lu <Yinghai.Lu@Sun.COM>2008-02-22 20:07:16 -0500
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:40:49 -0400
commit3def3d6ddf43dbe20c00c3cbc38dfacc8586998f (patch)
tree0d9b56966bc5c525d9d3a1be66e8ccd9d476e589 /arch/x86/kernel/e820_64.c
parent700efc1b9f6afe34caae231b87d129ad8ffb559f (diff)
x86: clean up e820_reserve_resources on 64-bit
e820_resource_resources could use insert_resource instead of request_resource also move code_resource, data_resource, bss_resource, and crashk_res out of e820_reserve_resources. Signed-off-by: Yinghai Lu <yinghai.lu@sun.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/e820_64.c')
-rw-r--r--arch/x86/kernel/e820_64.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index a8694a35352b..8b914a833ac6 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -229,8 +229,7 @@ unsigned long __init e820_end_of_ram(void)
229/* 229/*
230 * Mark e820 reserved areas as busy for the resource manager. 230 * Mark e820 reserved areas as busy for the resource manager.
231 */ 231 */
232void __init e820_reserve_resources(struct resource *code_resource, 232void __init e820_reserve_resources(void)
233 struct resource *data_resource, struct resource *bss_resource)
234{ 233{
235 int i; 234 int i;
236 for (i = 0; i < e820.nr_map; i++) { 235 for (i = 0; i < e820.nr_map; i++) {
@@ -245,21 +244,7 @@ void __init e820_reserve_resources(struct resource *code_resource,
245 res->start = e820.map[i].addr; 244 res->start = e820.map[i].addr;
246 res->end = res->start + e820.map[i].size - 1; 245 res->end = res->start + e820.map[i].size - 1;
247 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 246 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
248 request_resource(&iomem_resource, res); 247 insert_resource(&iomem_resource, res);
249 if (e820.map[i].type == E820_RAM) {
250 /*
251 * We don't know which RAM region contains kernel data,
252 * so we try it repeatedly and let the resource manager
253 * test it.
254 */
255 request_resource(res, code_resource);
256 request_resource(res, data_resource);
257 request_resource(res, bss_resource);
258#ifdef CONFIG_KEXEC
259 if (crashk_res.start != crashk_res.end)
260 request_resource(res, &crashk_res);
261#endif
262 }
263 } 248 }
264} 249}
265 250