aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/step.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-01-30 07:30:56 -0500
committerIngo Molnar <mingo@elte.hu>2008-01-30 07:30:56 -0500
commit65ea5b0349903585bfed9720fa06f5edb4f1cd25 (patch)
tree6c252228c34416b7e2077f23475de34500c2ab8a /arch/x86/kernel/step.c
parent53756d3722172815f52272b28c6d5d5e9639adde (diff)
x86: rename the struct pt_regs members for 32/64-bit consistency
We have a lot of code which differs only by the naming of specific members of structures that contain registers. In order to enable additional unifications, this patch drops the e- or r- size prefix from the register names in struct pt_regs, and drops the x- prefixes for segment registers on the 32-bit side. This patch also performs the equivalent renames in some additional places that might be candidates for unification in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/step.c')
-rw-r--r--arch/x86/kernel/step.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c
index cf4b9dac4a05..f55c003f5b63 100644
--- a/arch/x86/kernel/step.c
+++ b/arch/x86/kernel/step.c
@@ -12,17 +12,12 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r
12{ 12{
13 unsigned long addr, seg; 13 unsigned long addr, seg;
14 14
15#ifdef CONFIG_X86_64 15 addr = regs->ip;
16 addr = regs->rip;
17 seg = regs->cs & 0xffff; 16 seg = regs->cs & 0xffff;
18#else 17 if (v8086_mode(regs)) {
19 addr = regs->eip;
20 seg = regs->xcs & 0xffff;
21 if (regs->eflags & X86_EFLAGS_VM) {
22 addr = (addr & 0xffff) + (seg << 4); 18 addr = (addr & 0xffff) + (seg << 4);
23 return addr; 19 return addr;
24 } 20 }
25#endif
26 21
27 /* 22 /*
28 * We'll assume that the code segments in the GDT 23 * We'll assume that the code segments in the GDT
@@ -124,11 +119,11 @@ static int enable_single_step(struct task_struct *child)
124 /* 119 /*
125 * If TF was already set, don't do anything else 120 * If TF was already set, don't do anything else
126 */ 121 */
127 if (regs->eflags & X86_EFLAGS_TF) 122 if (regs->flags & X86_EFLAGS_TF)
128 return 0; 123 return 0;
129 124
130 /* Set TF on the kernel stack.. */ 125 /* Set TF on the kernel stack.. */
131 regs->eflags |= X86_EFLAGS_TF; 126 regs->flags |= X86_EFLAGS_TF;
132 127
133 /* 128 /*
134 * ..but if TF is changed by the instruction we will trace, 129 * ..but if TF is changed by the instruction we will trace,
@@ -203,5 +198,5 @@ void user_disable_single_step(struct task_struct *child)
203 198
204 /* But touch TF only if it was set by us.. */ 199 /* But touch TF only if it was set by us.. */
205 if (test_and_clear_tsk_thread_flag(child, TIF_FORCED_TF)) 200 if (test_and_clear_tsk_thread_flag(child, TIF_FORCED_TF))
206 task_pt_regs(child)->eflags &= ~X86_EFLAGS_TF; 201 task_pt_regs(child)->flags &= ~X86_EFLAGS_TF;
207} 202}