提交 77c03dcd 编写于 作者: R Roland McGrath 提交者: Ingo Molnar

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: NRoland McGrath <roland@redhat.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 2608a658
......@@ -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;
}
}
......
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册