Merge branch 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6.git] / arch / x86 / kernel / setup.c
index 61f86f24142068146377c797edc6cf260ea4c217..19f15c4076fb6f3f57afa01ddc211dbdce1ae202 100644 (file)
@@ -712,6 +712,21 @@ void __init setup_arch(char **cmdline_p)
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
        printk(KERN_INFO "Command line: %s\n", boot_command_line);
 #endif
 
+       strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
+       *cmdline_p = command_line;
+
+#ifdef CONFIG_X86_64
+       /*
+        * Must call this twice: Once just to detect whether hardware doesn't
+        * support NX (so that the early EHCI debug console setup can safely
+        * call set_fixmap(), and then again after parsing early parameters to
+        * honor the respective command line option.
+        */
+       check_efer();
+#endif
+
+       parse_early_param();
+
        /* VMI may relocate the fixmap; do this before touching ioremap area */
        vmi_init();
 
        /* VMI may relocate the fixmap; do this before touching ioremap area */
        vmi_init();
 
@@ -794,11 +809,6 @@ void __init setup_arch(char **cmdline_p)
 #endif
 #endif
 
 #endif
 #endif
 
-       strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
-       *cmdline_p = command_line;
-
-       parse_early_param();
-
 #ifdef CONFIG_X86_64
        check_efer();
 #endif
 #ifdef CONFIG_X86_64
        check_efer();
 #endif