Pull thermal into release branch
[linux-drm-fsl-dcu.git] / arch / i386 / kernel / ptrace.c
index af8aabe8580034970071a8ddb57630fbc619ace9..0c0ceec5de009e025c214b4c0f8af7f9d607510e 100644 (file)
@@ -9,7 +9,6 @@
 #include <linux/sched.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/errno.h>
 #include <linux/ptrace.h>
 #include <linux/user.h>
@@ -89,14 +88,14 @@ static int putreg(struct task_struct *child,
        unsigned long regno, unsigned long value)
 {
        switch (regno >> 2) {
-               case FS:
+               case GS:
                        if (value && (value & 3) != 3)
                                return -EIO;
-                       child->thread.fs = value;
+                       child->thread.gs = value;
                        return 0;
                case DS:
                case ES:
-               case GS:
+               case FS:
                        if (value && (value & 3) != 3)
                                return -EIO;
                        value &= 0xffff;
@@ -112,7 +111,7 @@ static int putreg(struct task_struct *child,
                        value |= get_stack_long(child, EFL_OFFSET) & ~FLAG_MASK;
                        break;
        }
-       if (regno > ES*4)
+       if (regno > FS*4)
                regno -= 1*4;
        put_stack_long(child, regno, value);
        return 0;
@@ -124,18 +123,18 @@ static unsigned long getreg(struct task_struct *child,
        unsigned long retval = ~0UL;
 
        switch (regno >> 2) {
-               case FS:
-                       retval = child->thread.fs;
+               case GS:
+                       retval = child->thread.gs;
                        break;
                case DS:
                case ES:
-               case GS:
+               case FS:
                case SS:
                case CS:
                        retval = 0xffff;
                        /* fall through */
                default:
-                       if (regno > ES*4)
+                       if (regno > FS*4)
                                regno -= 1*4;
                        retval &= get_stack_long(child, regno);
        }