Skip to content

Commit

Permalink
xen: clean up gate trap/interrupt constants
Browse files Browse the repository at this point in the history
Use GATE_INTERRUPT/TRAP rather than 0xe/f.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
  • Loading branch information
Jeremy Fitzhardinge committed Mar 30, 2009
1 parent 707ebbc commit 6d02c42
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,16 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
static int cvt_gate_to_trap(int vector, const gate_desc *val,
struct trap_info *info)
{
if (val->type != 0xf && val->type != 0xe)
if (val->type != GATE_TRAP && val->type != GATE_INTERRUPT)
return 0;

info->vector = vector;
info->address = gate_offset(*val);
info->cs = gate_segment(*val);
info->flags = val->dpl;
/* interrupt gates clear IF */
if (val->type == 0xe)
info->flags |= 4;
if (val->type == GATE_INTERRUPT)
info->flags |= 1 << 2;

return 1;
}
Expand Down

0 comments on commit 6d02c42

Please sign in to comment.