]> err.no Git - linux-2.6/commitdiff
x86: remove TRAP_FLAG
authorRoland McGrath <roland@redhat.com>
Wed, 30 Jan 2008 12:30:48 +0000 (13:30 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:30:48 +0000 (13:30 +0100)
This gets rid of the local constant macro TRAP_FLAG.
It's redundant with the public constant macro X86_EFLAGS_TF.

Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/ptrace_32.c
arch/x86/kernel/ptrace_64.c

index 09227cfb7c4c3733021620a00fc66fbf18266402..4619bda470b6c427959a4f9b65c222dd2830ce44 100644 (file)
@@ -37,9 +37,6 @@
  */
 #define FLAG_MASK 0x00050dd5
 
  */
 #define FLAG_MASK 0x00050dd5
 
-/* set's the trap flag. */
-#define TRAP_FLAG 0x100
-
 /*
  * Offset of eflags on child stack..
  */
 /*
  * Offset of eflags on child stack..
  */
@@ -235,11 +232,11 @@ static void set_singlestep(struct task_struct *child)
        /*
         * If TF was already set, don't do anything else
         */
        /*
         * If TF was already set, don't do anything else
         */
-       if (regs->eflags & TRAP_FLAG)
+       if (regs->eflags & X86_EFLAGS_TF)
                return;
 
        /* Set TF on the kernel stack.. */
                return;
 
        /* Set TF on the kernel stack.. */
-       regs->eflags |= TRAP_FLAG;
+       regs->eflags |= X86_EFLAGS_TF;
 
        /*
         * ..but if TF is changed by the instruction we will trace,
 
        /*
         * ..but if TF is changed by the instruction we will trace,
@@ -260,7 +257,7 @@ static void clear_singlestep(struct task_struct *child)
        /* But touch TF only if it was set by us.. */
        if (child->ptrace & PT_DTRACE) {
                struct pt_regs *regs = get_child_regs(child);
        /* But touch TF only if it was set by us.. */
        if (child->ptrace & PT_DTRACE) {
                struct pt_regs *regs = get_child_regs(child);
-               regs->eflags &= ~TRAP_FLAG;
+               regs->eflags &= ~X86_EFLAGS_TF;
                child->ptrace &= ~PT_DTRACE;
        }
 }
                child->ptrace &= ~PT_DTRACE;
        }
 }
index 375fadc23a25317fa26ad937f1935813ef3d850d..8e433b3773d2bbffabea6efcaf1352e0f5f417fe 100644 (file)
@@ -42,9 +42,6 @@
  */
 #define FLAG_MASK 0x54dd5UL
 
  */
 #define FLAG_MASK 0x54dd5UL
 
-/* set's the trap flag. */
-#define TRAP_FLAG 0x100UL
-
 /*
  * eflags and offset of eflags on child stack..
  */
 /*
  * eflags and offset of eflags on child stack..
  */
@@ -187,11 +184,11 @@ static void set_singlestep(struct task_struct *child)
        /*
         * If TF was already set, don't do anything else
         */
        /*
         * If TF was already set, don't do anything else
         */
-       if (regs->eflags & TRAP_FLAG)
+       if (regs->eflags & X86_EFLAGS_TF)
                return;
 
        /* Set TF on the kernel stack.. */
                return;
 
        /* Set TF on the kernel stack.. */
-       regs->eflags |= TRAP_FLAG;
+       regs->eflags |= X86_EFLAGS_TF;
 
        /*
         * ..but if TF is changed by the instruction we will trace,
 
        /*
         * ..but if TF is changed by the instruction we will trace,
@@ -212,7 +209,7 @@ static void clear_singlestep(struct task_struct *child)
        /* But touch TF only if it was set by us.. */
        if (child->ptrace & PT_DTRACE) {
                struct pt_regs *regs = task_pt_regs(child);
        /* But touch TF only if it was set by us.. */
        if (child->ptrace & PT_DTRACE) {
                struct pt_regs *regs = task_pt_regs(child);
-               regs->eflags &= ~TRAP_FLAG;
+               regs->eflags &= ~X86_EFLAGS_TF;
                child->ptrace &= ~PT_DTRACE;
        }
 }
                child->ptrace &= ~PT_DTRACE;
        }
 }