forked from Minki/linux
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>
This commit is contained in:
parent
5f5cd8fd60
commit
d729ab35ee
@ -475,14 +475,16 @@ good_area:
|
|||||||
else
|
else
|
||||||
tsk->min_flt++;
|
tsk->min_flt++;
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_32
|
||||||
/*
|
/*
|
||||||
* Did it hit the DOS screen memory VA from vm86 mode?
|
* Did it hit the DOS screen memory VA from vm86 mode?
|
||||||
*/
|
*/
|
||||||
if (regs->flags & VM_MASK) {
|
if (v8086_mode(regs)) {
|
||||||
unsigned long bit = (address - 0xA0000) >> PAGE_SHIFT;
|
unsigned long bit = (address - 0xA0000) >> PAGE_SHIFT;
|
||||||
if (bit < 32)
|
if (bit < 32)
|
||||||
tsk->thread.screen_bitmap |= 1 << bit;
|
tsk->thread.screen_bitmap |= 1 << bit;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
up_read(&mm->mmap_sem);
|
up_read(&mm->mmap_sem);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -514,6 +514,17 @@ good_area:
|
|||||||
tsk->maj_flt++;
|
tsk->maj_flt++;
|
||||||
else
|
else
|
||||||
tsk->min_flt++;
|
tsk->min_flt++;
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_32
|
||||||
|
/*
|
||||||
|
* Did it hit the DOS screen memory VA from vm86 mode?
|
||||||
|
*/
|
||||||
|
if (v8086_mode(regs)) {
|
||||||
|
unsigned long bit = (address - 0xA0000) >> PAGE_SHIFT;
|
||||||
|
if (bit < 32)
|
||||||
|
tsk->thread.screen_bitmap |= 1 << bit;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
up_read(&mm->mmap_sem);
|
up_read(&mm->mmap_sem);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user