aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-01-30 07:30:48 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:48 -0500
commit77c03dcd448aa4c7be45f4edb97381ef463e3911 (patch)
tree4f9f5de145846bbeac75b33ab10354fdde801583 /arch/x86
parent2608a6584a0a32d3251dfafad31d9f8b2c784466 (diff)
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 <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/ptrace_32.c9
-rw-r--r--arch/x86/kernel/ptrace_64.c9
2 files changed, 6 insertions, 12 deletions
diff --git a/arch/x86/kernel/ptrace_32.c b/arch/x86/kernel/ptrace_32.c
index 09227cfb7c4c..4619bda470b6 100644
--- a/arch/x86/kernel/ptrace_32.c
+++ b/arch/x86/kernel/ptrace_32.c
@@ -37,9 +37,6 @@
37 */ 37 */
38#define FLAG_MASK 0x00050dd5 38#define FLAG_MASK 0x00050dd5
39 39
40/* set's the trap flag. */
41#define TRAP_FLAG 0x100
42
43/* 40/*
44 * Offset of eflags on child stack.. 41 * Offset of eflags on child stack..
45 */ 42 */
@@ -235,11 +232,11 @@ static void set_singlestep(struct task_struct *child)
235 /* 232 /*
236 * If TF was already set, don't do anything else 233 * If TF was already set, don't do anything else
237 */ 234 */
238 if (regs->eflags & TRAP_FLAG) 235 if (regs->eflags & X86_EFLAGS_TF)
239 return; 236 return;
240 237
241 /* Set TF on the kernel stack.. */ 238 /* Set TF on the kernel stack.. */
242 regs->eflags |= TRAP_FLAG; 239 regs->eflags |= X86_EFLAGS_TF;
243 240
244 /* 241 /*
245 * ..but if TF is changed by the instruction we will trace, 242 * ..but if TF is changed by the instruction we will trace,
@@ -260,7 +257,7 @@ static void clear_singlestep(struct task_struct *child)
260 /* But touch TF only if it was set by us.. */ 257 /* But touch TF only if it was set by us.. */
261 if (child->ptrace & PT_DTRACE) { 258 if (child->ptrace & PT_DTRACE) {
262 struct pt_regs *regs = get_child_regs(child); 259 struct pt_regs *regs = get_child_regs(child);
263 regs->eflags &= ~TRAP_FLAG; 260 regs->eflags &= ~X86_EFLAGS_TF;
264 child->ptrace &= ~PT_DTRACE; 261 child->ptrace &= ~PT_DTRACE;
265 } 262 }
266} 263}
diff --git a/arch/x86/kernel/ptrace_64.c b/arch/x86/kernel/ptrace_64.c
index 375fadc23a25..8e433b3773d2 100644
--- a/arch/x86/kernel/ptrace_64.c
+++ b/arch/x86/kernel/ptrace_64.c
@@ -42,9 +42,6 @@
42 */ 42 */
43#define FLAG_MASK 0x54dd5UL 43#define FLAG_MASK 0x54dd5UL
44 44
45/* set's the trap flag. */
46#define TRAP_FLAG 0x100UL
47
48/* 45/*
49 * eflags and offset of eflags on child stack.. 46 * eflags and offset of eflags on child stack..
50 */ 47 */
@@ -187,11 +184,11 @@ static void set_singlestep(struct task_struct *child)
187 /* 184 /*
188 * If TF was already set, don't do anything else 185 * If TF was already set, don't do anything else
189 */ 186 */
190 if (regs->eflags & TRAP_FLAG) 187 if (regs->eflags & X86_EFLAGS_TF)
191 return; 188 return;
192 189
193 /* Set TF on the kernel stack.. */ 190 /* Set TF on the kernel stack.. */
194 regs->eflags |= TRAP_FLAG; 191 regs->eflags |= X86_EFLAGS_TF;
195 192
196 /* 193 /*
197 * ..but if TF is changed by the instruction we will trace, 194 * ..but if TF is changed by the instruction we will trace,
@@ -212,7 +209,7 @@ static void clear_singlestep(struct task_struct *child)
212 /* But touch TF only if it was set by us.. */ 209 /* But touch TF only if it was set by us.. */
213 if (child->ptrace & PT_DTRACE) { 210 if (child->ptrace & PT_DTRACE) {
214 struct pt_regs *regs = task_pt_regs(child); 211 struct pt_regs *regs = task_pt_regs(child);
215 regs->eflags &= ~TRAP_FLAG; 212 regs->eflags &= ~X86_EFLAGS_TF;
216 child->ptrace &= ~PT_DTRACE; 213 child->ptrace &= ~PT_DTRACE;
217 } 214 }
218} 215}