aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/e820_64.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/e820_64.c b/arch/x86/kernel/e820_64.c
index 4509757844eb..9184e6437c4f 100644
--- a/arch/x86/kernel/e820_64.c
+++ b/arch/x86/kernel/e820_64.c
@@ -300,9 +300,10 @@ unsigned long __init e820_end_of_ram(void)
300void __init e820_reserve_resources(void) 300void __init e820_reserve_resources(void)
301{ 301{
302 int i; 302 int i;
303 struct resource *res;
304
305 res = alloc_bootmem_low(sizeof(struct resource) * e820.nr_map);
303 for (i = 0; i < e820.nr_map; i++) { 306 for (i = 0; i < e820.nr_map; i++) {
304 struct resource *res;
305 res = alloc_bootmem_low(sizeof(struct resource));
306 switch (e820.map[i].type) { 307 switch (e820.map[i].type) {
307 case E820_RAM: res->name = "System RAM"; break; 308 case E820_RAM: res->name = "System RAM"; break;
308 case E820_ACPI: res->name = "ACPI Tables"; break; 309 case E820_ACPI: res->name = "ACPI Tables"; break;
@@ -313,6 +314,7 @@ void __init e820_reserve_resources(void)
313 res->end = res->start + e820.map[i].size - 1; 314 res->end = res->start + e820.map[i].size - 1;
314 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; 315 res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
315 insert_resource(&iomem_resource, res); 316 insert_resource(&iomem_resource, res);
317 res++;
316 } 318 }
317} 319}
318 320