提交 6d02c426 编写于 作者: J Jeremy Fitzhardinge

xen: clean up gate trap/interrupt constants

Use GATE_INTERRUPT/TRAP rather than 0xe/f.
Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
上级 707ebbc8
...@@ -428,7 +428,7 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, ...@@ -428,7 +428,7 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum,
static int cvt_gate_to_trap(int vector, const gate_desc *val, static int cvt_gate_to_trap(int vector, const gate_desc *val,
struct trap_info *info) struct trap_info *info)
{ {
if (val->type != 0xf && val->type != 0xe) if (val->type != GATE_TRAP && val->type != GATE_INTERRUPT)
return 0; return 0;
info->vector = vector; info->vector = vector;
...@@ -436,8 +436,8 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val, ...@@ -436,8 +436,8 @@ static int cvt_gate_to_trap(int vector, const gate_desc *val,
info->cs = gate_segment(*val); info->cs = gate_segment(*val);
info->flags = val->dpl; info->flags = val->dpl;
/* interrupt gates clear IF */ /* interrupt gates clear IF */
if (val->type == 0xe) if (val->type == GATE_INTERRUPT)
info->flags |= 4; info->flags |= 1 << 2;
return 1; return 1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册