Merge branch 'for_paulus' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc
[sfrench/cifs-2.6.git] / arch / x86_64 / kernel / setup64.c
index 6eff51e9400c7285587eae76077bd953542065c7..f5934cb4a2b60457e71f3ba1a109dc0b67cc66f0 100644 (file)
@@ -3,7 +3,6 @@
  * Copyright (C) 1995  Linus Torvalds
  * Copyright 2001, 2002, 2003 SuSE Labs / Andi Kleen.
  * See setup.c for older changelog.
- * $Id: setup64.c,v 1.12 2002/03/21 10:09:17 ak Exp $
  */ 
 #include <linux/config.h>
 #include <linux/init.h>
@@ -31,14 +30,16 @@ char x86_boot_params[BOOT_PARAM_SIZE] __initdata = {0,};
 cpumask_t cpu_initialized __cpuinitdata = CPU_MASK_NONE;
 
 struct x8664_pda *_cpu_pda[NR_CPUS] __read_mostly;
+EXPORT_SYMBOL(_cpu_pda);
 struct x8664_pda boot_cpu_pda[NR_CPUS] __cacheline_aligned;
 
-struct desc_ptr idt_descr = { 256 * 16, (unsigned long) idt_table }; 
+struct desc_ptr idt_descr = { 256 * 16 - 1, (unsigned long) idt_table };
 
 char boot_cpu_stack[IRQSTACKSIZE] __attribute__((section(".bss.page_aligned")));
 
 unsigned long __supported_pte_mask __read_mostly = ~0UL;
-static int do_not_nx __initdata = 0;
+EXPORT_SYMBOL(__supported_pte_mask);
+static int do_not_nx __cpuinitdata = 0;
 
 /* noexec=on|off
 Control non executable mappings for 64bit processes.
@@ -55,11 +56,11 @@ int __init nonx_setup(char *str)
                do_not_nx = 1;
                __supported_pte_mask &= ~_PAGE_NX;
         }
-       return 0;
+       return 1;
 } 
 __setup("noexec=", nonx_setup);        /* parsed early actually */
 
-int force_personality32 = READ_IMPLIES_EXEC;
+int force_personality32 = 0; 
 
 /* noexec32=on|off
 Control non executable heap for 32bit processes.
@@ -74,7 +75,7 @@ static int __init nonx32_setup(char *str)
                force_personality32 &= ~READ_IMPLIES_EXEC;
        else if (!strcmp(str, "off"))
                force_personality32 |= READ_IMPLIES_EXEC;
-       return 0;
+       return 1;
 }
 __setup("noexec32=", nonx32_setup);
 
@@ -146,7 +147,7 @@ void pda_init(int cpu)
        pda->irqstackptr += IRQSTACKSIZE-64;
 } 
 
-char boot_exception_stacks[(N_EXCEPTION_STACKS - 2) * EXCEPTION_STKSZ + DEBUG_STKSZ]
+char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + DEBUG_STKSZ]
 __attribute__((section(".bss.page_aligned")));
 
 /* May not be marked __init: used by software suspend */
@@ -248,7 +249,7 @@ void __cpuinit cpu_init (void)
                switch (v + 1) {
 #if DEBUG_STKSZ > EXCEPTION_STKSZ
                case DEBUG_STACK:
-                       cpu_pda[cpu].debugstack = (unsigned long)estacks;
+                       cpu_pda(cpu)->debugstack = (unsigned long)estacks;
                        estacks += DEBUG_STKSZ;
                        break;
 #endif
@@ -281,12 +282,12 @@ void __cpuinit cpu_init (void)
         * Clear all 6 debug registers:
         */
 
-       set_debug(0UL, 0);
-       set_debug(0UL, 1);
-       set_debug(0UL, 2);
-       set_debug(0UL, 3);
-       set_debug(0UL, 6);
-       set_debug(0UL, 7);
+       set_debugreg(0UL, 0);
+       set_debugreg(0UL, 1);
+       set_debugreg(0UL, 2);
+       set_debugreg(0UL, 3);
+       set_debugreg(0UL, 6);
+       set_debugreg(0UL, 7);
 
        fpu_init(); 
 }