x86: let setup_arch call init_apic_mappings for 32bit
[platform/kernel/linux-arm64.git] / arch / x86 / kernel / setup.c
index f2e314b..4716460 100644 (file)
 #include <asm/proto.h>
 
 #include <mach_apic.h>
-#ifdef CONFIG_PARAVIRT
 #include <asm/paravirt.h>
-#else
-#define ARCH_SETUP
-#endif
 
 #include <asm/percpu.h>
 #include <asm/sections.h>
 #ifdef CONFIG_X86_64
 #include <asm/numa_64.h>
 #endif
-#ifdef CONFIG_X86_32
-#include <asm/highmem.h>
+
+#ifndef ARCH_SETUP
+#define ARCH_SETUP
 #endif
 
 #ifndef CONFIG_DEBUG_BOOT_PARAMS
@@ -614,11 +611,6 @@ void __init setup_arch(char **cmdline_p)
 
 #ifdef CONFIG_X86_32
        probe_roms();
-#else
-# ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
-       if (init_ohci1394_dma_early)
-               init_ohci1394_dma_on_all_controllers();
-# endif
 #endif
 
        /* after parse_early_param, so could debug it */
@@ -675,6 +667,15 @@ void __init setup_arch(char **cmdline_p)
        /* max_pfn_mapped is updated here */
        max_pfn_mapped = init_memory_mapping(0, (max_low_pfn << PAGE_SHIFT));
 
+       /*
+        * NOTE: On x86-32, only from this point on, fixmaps are ready for use.
+        */
+
+#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
+       if (init_ohci1394_dma_early)
+               init_ohci1394_dma_on_all_controllers();
+#endif
+
        reserve_initrd();
 
 #ifdef CONFIG_X86_64
@@ -742,15 +743,6 @@ void __init setup_arch(char **cmdline_p)
        map_vsyscall();
 #endif
 
-       /*
-        * NOTE: On x86-32, only from this point on, fixmaps are ready for use.
-        */
-
-#if defined(CONFIG_PROVIDE_OHCI1394_DMA_INIT) && defined(CONFIG_X86_32)
-       if (init_ohci1394_dma_early)
-               init_ohci1394_dma_on_all_controllers();
-#endif
-
 #ifdef CONFIG_X86_GENERICARCH
        generic_apic_probe();
 #endif
@@ -774,16 +766,14 @@ void __init setup_arch(char **cmdline_p)
                get_smp_config();
 #endif
 
-#ifdef CONFIG_X86_64
        init_apic_mappings();
        ioapic_init_mappings();
-#else
-# if defined(CONFIG_SMP) && defined(CONFIG_X86_PC)
+
+#if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32)
        if (def_to_bigsmp)
                printk(KERN_WARNING "More than 8 CPUs detected and "
                        "CONFIG_X86_PC cannot handle it.\nUse "
                        "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
-# endif
 #endif
        kvm_guest_init();
 
@@ -806,4 +796,3 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 }
-