[PATCH] i386: show_registers(): try harder to print failing code
[powerpc.git] / arch / i386 / kernel / setup.c
index 4a65040..060c680 100644 (file)
  * This file handles the architecture-dependent parts of initialization
  */
 
-#include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/mmzone.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/ioport.h>
 #include <linux/acpi.h>
 #include <linux/apm_bios.h>
@@ -54,6 +53,7 @@
 #include <asm/apic.h>
 #include <asm/e820.h>
 #include <asm/mpspec.h>
+#include <asm/mmzone.h>
 #include <asm/setup.h>
 #include <asm/arch_hooks.h>
 #include <asm/sections.h>
@@ -1182,7 +1182,7 @@ static unsigned long __init setup_memory(void)
 
 void __init zone_sizes_init(void)
 {
-       unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
+       unsigned long zones_size[MAX_NR_ZONES] = { 0, };
        unsigned int max_dma, low;
 
        max_dma = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
@@ -1259,7 +1259,7 @@ void __init setup_bootmem_allocator(void)
         */
        find_smp_config();
 #endif
-
+       numa_kva_reserve();
 #ifdef CONFIG_BLK_DEV_INITRD
        if (LOADER_TYPE && INITRD_START) {
                if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
@@ -1314,8 +1314,10 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
        probe_roms();
        for (i = 0; i < e820.nr_map; i++) {
                struct resource *res;
+#ifndef CONFIG_RESOURCES_64BIT
                if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL)
                        continue;
+#endif
                res = kzalloc(sizeof(struct resource), GFP_ATOMIC);
                switch (e820.map[i].type) {
                case E820_RAM:  res->name = "System RAM"; break;
@@ -1326,7 +1328,10 @@ legacy_init_iomem_resources(struct resource *code_resource, struct resource *dat
                res->start = e820.map[i].addr;
                res->end = res->start + e820.map[i].size - 1;
                res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
-               request_resource(&iomem_resource, res);
+               if (request_resource(&iomem_resource, res)) {
+                       kfree(res);
+                       continue;
+               }
                if (e820.map[i].type == E820_RAM) {
                        /*
                         *  We don't know which RAM region contains kernel data,