Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=77c03dcd448aa4c7be45f4edb97381ef463e3911
Commit:     77c03dcd448aa4c7be45f4edb97381ef463e3911
Parent:     2608a6584a0a32d3251dfafad31d9f8b2c784466
Author:     Roland McGrath <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:30:48 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:30:48 2008 +0100

    x86: remove TRAP_FLAG
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/ptrace_32.c |    9 +++------
 arch/x86/kernel/ptrace_64.c |    9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c
index 09227cf..4619bda 100644
--- a/arch/x86/kernel/ptrace_32.c
+++ b/arch/x86/kernel/ptrace_32.c
@@ -37,9 +37,6 @@
  */
 #define FLAG_MASK 0x00050dd5
 
-/* set's the trap flag. */
-#define TRAP_FLAG 0x100
-
 /*
  * 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 (regs->eflags & TRAP_FLAG)
+       if (regs->eflags & X86_EFLAGS_TF)
                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,
@@ -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);
-               regs->eflags &= ~TRAP_FLAG;
+               regs->eflags &= ~X86_EFLAGS_TF;
                child->ptrace &= ~PT_DTRACE;
        }
 }
diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c
index 375fadc..8e433b3 100644
--- a/arch/x86/kernel/ptrace_64.c
+++ b/arch/x86/kernel/ptrace_64.c
@@ -42,9 +42,6 @@
  */
 #define FLAG_MASK 0x54dd5UL
 
-/* set's the trap flag. */
-#define TRAP_FLAG 0x100UL
-
 /*
  * 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 (regs->eflags & TRAP_FLAG)
+       if (regs->eflags & X86_EFLAGS_TF)
                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,
@@ -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);
-               regs->eflags &= ~TRAP_FLAG;
+               regs->eflags &= ~X86_EFLAGS_TF;
                child->ptrace &= ~PT_DTRACE;
        }
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to