diff options
Diffstat (limited to 'arch/i386/kernel/setup.c')
-rw-r--r-- | arch/i386/kernel/setup.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index d313a11acafa..6917daa159ab 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -1058,10 +1058,10 @@ static int __init | |||
1058 | free_available_memory(unsigned long start, unsigned long end, void *arg) | 1058 | free_available_memory(unsigned long start, unsigned long end, void *arg) |
1059 | { | 1059 | { |
1060 | /* check max_low_pfn */ | 1060 | /* check max_low_pfn */ |
1061 | if (start >= ((max_low_pfn + 1) << PAGE_SHIFT)) | 1061 | if (start >= (max_low_pfn << PAGE_SHIFT)) |
1062 | return 0; | 1062 | return 0; |
1063 | if (end >= ((max_low_pfn + 1) << PAGE_SHIFT)) | 1063 | if (end >= (max_low_pfn << PAGE_SHIFT)) |
1064 | end = (max_low_pfn + 1) << PAGE_SHIFT; | 1064 | end = max_low_pfn << PAGE_SHIFT; |
1065 | if (start < end) | 1065 | if (start < end) |
1066 | free_bootmem(start, end - start); | 1066 | free_bootmem(start, end - start); |
1067 | 1067 | ||
@@ -1286,8 +1286,6 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat | |||
1286 | probe_roms(); | 1286 | probe_roms(); |
1287 | for (i = 0; i < e820.nr_map; i++) { | 1287 | for (i = 0; i < e820.nr_map; i++) { |
1288 | struct resource *res; | 1288 | struct resource *res; |
1289 | if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) | ||
1290 | continue; | ||
1291 | res = kzalloc(sizeof(struct resource), GFP_ATOMIC); | 1289 | res = kzalloc(sizeof(struct resource), GFP_ATOMIC); |
1292 | switch (e820.map[i].type) { | 1290 | switch (e820.map[i].type) { |
1293 | case E820_RAM: res->name = "System RAM"; break; | 1291 | case E820_RAM: res->name = "System RAM"; break; |