Skip to content

Commit

Permalink
x86: single_step segment macros
Browse files Browse the repository at this point in the history
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 <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Roland McGrath authored and Ingo Molnar committed Jan 30, 2008
1 parent fa1e03e commit 3f80c1a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions arch/x86/kernel/step.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include <linux/mm.h>
#include <linux/ptrace.h>

#define LDT_SEGMENT 4

unsigned long convert_rip_to_linear(struct task_struct *child, struct pt_regs *regs)
{
unsigned long addr, seg;
Expand All @@ -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;

Expand Down

0 comments on commit 3f80c1a

Please sign in to comment.