From: Roland McGrath Date: Wed, 30 Jan 2008 12:30:50 +0000 (+0100) Subject: x86: single_step segment macros X-Git-Tag: v2.6.25-rc1~1143^2~706 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3f80c1adc900769f2070432419da3b5ddbf066fc;p=linux-2.6-omap-h63xx.git x86: single_step segment macros This cleans up the single-step code to use the asm/segment.h macros for segment selector magic bits, rather than its own constant. Signed-off-by: Roland McGrath Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c index cb3c8bc2939..3b70f20f21f 100644 --- a/arch/x86/kernel/step.c +++ b/arch/x86/kernel/step.c @@ -5,8 +5,6 @@ #include #include -#define LDT_SEGMENT 4 - unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *regs) { unsigned long addr, seg; @@ -20,7 +18,7 @@ unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *r * TLS segments are used for data, and the PNPBIOS * and APM bios ones we just ignore here. */ - if (seg & LDT_SEGMENT) { + if ((seg & SEGMENT_TI_MASK) == SEGMENT_LDT) { u32 *desc; unsigned long base;