diff options
author | gorcunov@gmail.com <gorcunov@gmail.com> | 2008-03-28 10:56:56 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:41:33 -0400 |
commit | a5c15d419d4b68535222b51f9054dd08d5e67470 (patch) | |
tree | ab6bebec8b83ec7c688a6f2c23979d10a4da3aa1 /arch/x86/kernel/vm86_32.c | |
parent | 6b6891f9c545ccd45d6d8ddfd33ce27c22c271a7 (diff) |
x86: replace most VM86 flags with flags from processor-flags.h
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/vm86_32.c')
-rw-r--r-- | arch/x86/kernel/vm86_32.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/x86/kernel/vm86_32.c b/arch/x86/kernel/vm86_32.c index c866c00f4a85..38f566fa27d2 100644 --- a/arch/x86/kernel/vm86_32.c +++ b/arch/x86/kernel/vm86_32.c | |||
@@ -139,7 +139,7 @@ struct pt_regs *save_v86_state(struct kernel_vm86_regs *regs) | |||
139 | printk("no vm86_info: BAD\n"); | 139 | printk("no vm86_info: BAD\n"); |
140 | do_exit(SIGSEGV); | 140 | do_exit(SIGSEGV); |
141 | } | 141 | } |
142 | set_flags(regs->pt.flags, VEFLAGS, VIF_MASK | current->thread.v86mask); | 142 | set_flags(regs->pt.flags, VEFLAGS, X86_EFLAGS_VIF | current->thread.v86mask); |
143 | tmp = copy_vm86_regs_to_user(¤t->thread.vm86_info->regs, regs); | 143 | tmp = copy_vm86_regs_to_user(¤t->thread.vm86_info->regs, regs); |
144 | tmp += put_user(current->thread.screen_bitmap, ¤t->thread.vm86_info->screen_bitmap); | 144 | tmp += put_user(current->thread.screen_bitmap, ¤t->thread.vm86_info->screen_bitmap); |
145 | if (tmp) { | 145 | if (tmp) { |
@@ -306,13 +306,13 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk | |||
306 | tsk->thread.v86mask = 0; | 306 | tsk->thread.v86mask = 0; |
307 | break; | 307 | break; |
308 | case CPU_386: | 308 | case CPU_386: |
309 | tsk->thread.v86mask = NT_MASK | IOPL_MASK; | 309 | tsk->thread.v86mask = X86_EFLAGS_NT | X86_EFLAGS_IOPL; |
310 | break; | 310 | break; |
311 | case CPU_486: | 311 | case CPU_486: |
312 | tsk->thread.v86mask = AC_MASK | NT_MASK | IOPL_MASK; | 312 | tsk->thread.v86mask = X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; |
313 | break; | 313 | break; |
314 | default: | 314 | default: |
315 | tsk->thread.v86mask = ID_MASK | AC_MASK | NT_MASK | IOPL_MASK; | 315 | tsk->thread.v86mask = X86_EFLAGS_ID | X86_EFLAGS_AC | X86_EFLAGS_NT | X86_EFLAGS_IOPL; |
316 | break; | 316 | break; |
317 | } | 317 | } |
318 | 318 | ||
@@ -363,24 +363,24 @@ static inline void return_to_32bit(struct kernel_vm86_regs *regs16, int retval) | |||
363 | 363 | ||
364 | static inline void set_IF(struct kernel_vm86_regs *regs) | 364 | static inline void set_IF(struct kernel_vm86_regs *regs) |
365 | { | 365 | { |
366 | VEFLAGS |= VIF_MASK; | 366 | VEFLAGS |= X86_EFLAGS_VIF; |
367 | if (VEFLAGS & VIP_MASK) | 367 | if (VEFLAGS & X86_EFLAGS_VIP) |
368 | return_to_32bit(regs, VM86_STI); | 368 | return_to_32bit(regs, VM86_STI); |
369 | } | 369 | } |
370 | 370 | ||
371 | static inline void clear_IF(struct kernel_vm86_regs *regs) | 371 | static inline void clear_IF(struct kernel_vm86_regs *regs) |
372 | { | 372 | { |
373 | VEFLAGS &= ~VIF_MASK; | 373 | VEFLAGS &= ~X86_EFLAGS_VIF; |
374 | } | 374 | } |
375 | 375 | ||
376 | static inline void clear_TF(struct kernel_vm86_regs *regs) | 376 | static inline void clear_TF(struct kernel_vm86_regs *regs) |
377 | { | 377 | { |
378 | regs->pt.flags &= ~TF_MASK; | 378 | regs->pt.flags &= ~X86_EFLAGS_TF; |
379 | } | 379 | } |
380 | 380 | ||
381 | static inline void clear_AC(struct kernel_vm86_regs *regs) | 381 | static inline void clear_AC(struct kernel_vm86_regs *regs) |
382 | { | 382 | { |
383 | regs->pt.flags &= ~AC_MASK; | 383 | regs->pt.flags &= ~X86_EFLAGS_AC; |
384 | } | 384 | } |
385 | 385 | ||
386 | /* | 386 | /* |
@@ -399,7 +399,7 @@ static inline void set_vflags_long(unsigned long flags, struct kernel_vm86_regs | |||
399 | { | 399 | { |
400 | set_flags(VEFLAGS, flags, current->thread.v86mask); | 400 | set_flags(VEFLAGS, flags, current->thread.v86mask); |
401 | set_flags(regs->pt.flags, flags, SAFE_MASK); | 401 | set_flags(regs->pt.flags, flags, SAFE_MASK); |
402 | if (flags & IF_MASK) | 402 | if (flags & X86_EFLAGS_IF) |
403 | set_IF(regs); | 403 | set_IF(regs); |
404 | else | 404 | else |
405 | clear_IF(regs); | 405 | clear_IF(regs); |
@@ -409,7 +409,7 @@ static inline void set_vflags_short(unsigned short flags, struct kernel_vm86_reg | |||
409 | { | 409 | { |
410 | set_flags(VFLAGS, flags, current->thread.v86mask); | 410 | set_flags(VFLAGS, flags, current->thread.v86mask); |
411 | set_flags(regs->pt.flags, flags, SAFE_MASK); | 411 | set_flags(regs->pt.flags, flags, SAFE_MASK); |
412 | if (flags & IF_MASK) | 412 | if (flags & X86_EFLAGS_IF) |
413 | set_IF(regs); | 413 | set_IF(regs); |
414 | else | 414 | else |
415 | clear_IF(regs); | 415 | clear_IF(regs); |
@@ -419,9 +419,9 @@ static inline unsigned long get_vflags(struct kernel_vm86_regs *regs) | |||
419 | { | 419 | { |
420 | unsigned long flags = regs->pt.flags & RETURN_MASK; | 420 | unsigned long flags = regs->pt.flags & RETURN_MASK; |
421 | 421 | ||
422 | if (VEFLAGS & VIF_MASK) | 422 | if (VEFLAGS & X86_EFLAGS_VIF) |
423 | flags |= IF_MASK; | 423 | flags |= X86_EFLAGS_IF; |
424 | flags |= IOPL_MASK; | 424 | flags |= X86_EFLAGS_IOPL; |
425 | return flags | (VEFLAGS & current->thread.v86mask); | 425 | return flags | (VEFLAGS & current->thread.v86mask); |
426 | } | 426 | } |
427 | 427 | ||
@@ -573,11 +573,11 @@ void handle_vm86_fault(struct kernel_vm86_regs *regs, long error_code) | |||
573 | 573 | ||
574 | #define CHECK_IF_IN_TRAP \ | 574 | #define CHECK_IF_IN_TRAP \ |
575 | if (VMPI.vm86dbg_active && VMPI.vm86dbg_TFpendig) \ | 575 | if (VMPI.vm86dbg_active && VMPI.vm86dbg_TFpendig) \ |
576 | newflags |= TF_MASK | 576 | newflags |= X86_EFLAGS_TF |
577 | #define VM86_FAULT_RETURN do { \ | 577 | #define VM86_FAULT_RETURN do { \ |
578 | if (VMPI.force_return_for_pic && (VEFLAGS & (IF_MASK | VIF_MASK))) \ | 578 | if (VMPI.force_return_for_pic && (VEFLAGS & (X86_EFLAGS_IF | X86_EFLAGS_VIF))) \ |
579 | return_to_32bit(regs, VM86_PICRETURN); \ | 579 | return_to_32bit(regs, VM86_PICRETURN); \ |
580 | if (orig_flags & TF_MASK) \ | 580 | if (orig_flags & X86_EFLAGS_TF) \ |
581 | handle_vm86_trap(regs, 0, 1); \ | 581 | handle_vm86_trap(regs, 0, 1); \ |
582 | return; } while (0) | 582 | return; } while (0) |
583 | 583 | ||