]> Pileus Git - ~andy/linux/commitdiff
Merge branch 'linus' into x86/cleanups
authorIngo Molnar <mingo@elte.hu>
Mon, 29 Dec 2008 12:09:40 +0000 (13:09 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 29 Dec 2008 12:09:40 +0000 (13:09 +0100)
arch/x86/include/asm/apic.h
arch/x86/kernel/apic.c
arch/x86/kernel/cpu/mtrr/main.c
arch/x86/kernel/reboot.c
arch/x86/kernel/traps.c

index 25caa0738af5f9d99399d3c2f36405bc62d7115b..e644bf6f90dc8a8dc4cdb8c557ee9e8941622853 100644 (file)
@@ -93,7 +93,7 @@ static inline u32 native_apic_msr_read(u32 reg)
 }
 
 #ifndef CONFIG_X86_32
-extern int x2apic, x2apic_preenabled;
+extern int x2apic;
 extern void check_x2apic(void);
 extern void enable_x2apic(void);
 extern void enable_IR_x2apic(void);
index b5229affb95397cf8dbab2f49ab823497f8ba531..c67722f010bde3492cf30973907a8390a0e87cb4 100644 (file)
@@ -98,8 +98,8 @@ __setup("apicpmtimer", setup_apicpmtimer);
 #ifdef HAVE_X2APIC
 int x2apic;
 /* x2apic enabled before OS handover */
-int x2apic_preenabled;
-int disable_x2apic;
+static int x2apic_preenabled;
+static int disable_x2apic;
 static __init int setup_nox2apic(char *str)
 {
        disable_x2apic = 1;
index 1159e269e596bc05d9b82d3ed633a434c67d1649..44fcb237bd52f6315556a6f8996ec29c7f11d4dd 100644 (file)
@@ -824,16 +824,14 @@ static int enable_mtrr_cleanup __initdata =
 
 static int __init disable_mtrr_cleanup_setup(char *str)
 {
-       if (enable_mtrr_cleanup != -1)
-               enable_mtrr_cleanup = 0;
+       enable_mtrr_cleanup = 0;
        return 0;
 }
 early_param("disable_mtrr_cleanup", disable_mtrr_cleanup_setup);
 
 static int __init enable_mtrr_cleanup_setup(char *str)
 {
-       if (enable_mtrr_cleanup != -1)
-               enable_mtrr_cleanup = 1;
+       enable_mtrr_cleanup = 1;
        return 0;
 }
 early_param("enable_mtrr_cleanup", enable_mtrr_cleanup_setup);
index 61f718df6eec1fe74dffaa2cb3b110b1deaeb70b..b165eb0884ed075ad77b88ee3a8a871f4a8df7b2 100644 (file)
@@ -22,6 +22,7 @@
 #endif
 
 #include <mach_ipi.h>
+#include "../pci/pci.h"
 
 
 /*
index 141907ab6e2260adaa2f20cbcdc6747751184c64..961e26a69d55e38bc5fe32034d420eaab98dd24e 100644 (file)
@@ -292,8 +292,10 @@ dotraplinkage void do_double_fault(struct pt_regs *regs, long error_code)
        tsk->thread.error_code = error_code;
        tsk->thread.trap_no = 8;
 
-       /* This is always a kernel trap and never fixable (and thus must
-          never return). */
+       /*
+        * This is always a kernel trap and never fixable (and thus must
+        * never return).
+        */
        for (;;)
                die(str, regs, error_code);
 }
@@ -520,9 +522,11 @@ dotraplinkage void __kprobes do_int3(struct pt_regs *regs, long error_code)
 }
 
 #ifdef CONFIG_X86_64
-/* Help handler running on IST stack to switch back to user stack
-   for scheduling or signal handling. The actual stack switch is done in
-   entry.S */
+/*
+ * Help handler running on IST stack to switch back to user stack
+ * for scheduling or signal handling. The actual stack switch is done in
+ * entry.S
+ */
 asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs)
 {
        struct pt_regs *regs = eregs;
@@ -532,8 +536,10 @@ asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *eregs)
        /* Exception from user space */
        else if (user_mode(eregs))
                regs = task_pt_regs(current);
-       /* Exception from kernel and interrupts are enabled. Move to
-          kernel process stack. */
+       /*
+        * Exception from kernel and interrupts are enabled. Move to
+        * kernel process stack.
+        */
        else if (eregs->flags & X86_EFLAGS_IF)
                regs = (struct pt_regs *)(eregs->sp -= sizeof(struct pt_regs));
        if (eregs != regs)
@@ -685,12 +691,7 @@ void math_error(void __user *ip)
        cwd = get_fpu_cwd(task);
        swd = get_fpu_swd(task);
 
-       err = swd & ~cwd & 0x3f;
-
-#ifdef CONFIG_X86_32
-       if (!err)
-               return;
-#endif
+       err = swd & ~cwd;
 
        if (err & 0x001) {      /* Invalid op */
                /*
@@ -708,7 +709,11 @@ void math_error(void __user *ip)
        } else if (err & 0x020) { /* Precision */
                info.si_code = FPE_FLTRES;
        } else {
-               info.si_code = __SI_FAULT|SI_KERNEL; /* WTF? */
+               /*
+                * If we're using IRQ 13, or supposedly even some trap 16
+                * implementations, it's possible we get a spurious trap...
+                */
+               return;         /* Spurious trap, no error */
        }
        force_sig_info(SIGFPE, &info, task);
 }