diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-01-30 07:33:23 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-01-30 07:33:23 -0500 |
commit | d729ab35ee1367b7690458ae9e050571cb055bd3 (patch) | |
tree | 4517ffe933ac66b3bea3e67b13735e099048015a | |
parent | 5f5cd8fd60c71ce47d2ce4e60e7ccbc306e91c64 (diff) |
x86: use v8086_mode helper, trivial unification
Use v8086_mode inline in fault_32.c, no functional change
also ifdef the section for 32-bit only and add to fault_64.c
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/mm/fault_32.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/fault_64.c | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/mm/fault_32.c b/arch/x86/mm/fault_32.c index 276863dc4bdd..93ede2dde958 100644 --- a/arch/x86/mm/fault_32.c +++ b/arch/x86/mm/fault_32.c | |||
@@ -475,14 +475,16 @@ good_area: | |||
475 | else | 475 | else |
476 | tsk->min_flt++; | 476 | tsk->min_flt++; |
477 | 477 | ||
478 | #ifdef CONFIG_X86_32 | ||
478 | /* | 479 | /* |
479 | * Did it hit the DOS screen memory VA from vm86 mode? | 480 | * Did it hit the DOS screen memory VA from vm86 mode? |
480 | */ | 481 | */ |
481 | if (regs->flags & VM_MASK) { | 482 | if (v8086_mode(regs)) { |
482 | unsigned long bit = (address - 0xA0000) >> PAGE_SHIFT; | 483 | unsigned long bit = (address - 0xA0000) >> PAGE_SHIFT; |
483 | if (bit < 32) | 484 | if (bit < 32) |
484 | tsk->thread.screen_bitmap |= 1 << bit; | 485 | tsk->thread.screen_bitmap |= 1 << bit; |
485 | } | 486 | } |
487 | #endif | ||
486 | up_read(&mm->mmap_sem); | 488 | up_read(&mm->mmap_sem); |
487 | return; | 489 | return; |
488 | 490 | ||
diff --git a/arch/x86/mm/fault_64.c b/arch/x86/mm/fault_64.c index 9ef0306efe9e..2d9e6da2cb30 100644 --- a/arch/x86/mm/fault_64.c +++ b/arch/x86/mm/fault_64.c | |||
@@ -514,6 +514,17 @@ good_area: | |||
514 | tsk->maj_flt++; | 514 | tsk->maj_flt++; |
515 | else | 515 | else |
516 | tsk->min_flt++; | 516 | tsk->min_flt++; |
517 | |||
518 | #ifdef CONFIG_X86_32 | ||
519 | /* | ||
520 | * Did it hit the DOS screen memory VA from vm86 mode? | ||
521 | */ | ||
522 | if (v8086_mode(regs)) { | ||
523 | unsigned long bit = (address - 0xA0000) >> PAGE_SHIFT; | ||
524 | if (bit < 32) | ||
525 | tsk->thread.screen_bitmap |= 1 << bit; | ||
526 | } | ||
527 | #endif | ||
517 | up_read(&mm->mmap_sem); | 528 | up_read(&mm->mmap_sem); |
518 | return; | 529 | return; |
519 | 530 | ||