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
2 changed files with 14 additions and 1 deletions
|
@ -475,14 +475,16 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
|
|||
else
|
||||
tsk->min_flt++;
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/*
|
||||
* 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;
|
||||
if (bit < 32)
|
||||
tsk->thread.screen_bitmap |= 1 << bit;
|
||||
}
|
||||
#endif
|
||||
up_read(&mm->mmap_sem);
|
||||
return;
|
||||
|
||||
|
|
|
@ -514,6 +514,17 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
|
|||
tsk->maj_flt++;
|
||||
else
|
||||
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);
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue