]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/mm/fault.c
Merge remote-tracking branch 'arm-soc/for-next'
[karo-tx-linux.git] / arch / x86 / mm / fault.c
index 9dc909841739bf24b01d7d2e574c4870cc409cfd..eef44d9a3f77e2acc88baa424683388f67985e24 100644 (file)
@@ -20,6 +20,7 @@
 #include <asm/kmemcheck.h>             /* kmemcheck_*(), ...           */
 #include <asm/fixmap.h>                        /* VSYSCALL_ADDR                */
 #include <asm/vsyscall.h>              /* emulate_vsyscall             */
+#include <asm/vm86.h>                  /* struct vm86                  */
 
 #define CREATE_TRACE_POINTS
 #include <asm/trace/exceptions.h>
@@ -301,14 +302,16 @@ static inline void
 check_v8086_mode(struct pt_regs *regs, unsigned long address,
                 struct task_struct *tsk)
 {
+#ifdef CONFIG_VM86
        unsigned long bit;
 
-       if (!v8086_mode(regs))
+       if (!v8086_mode(regs) || !tsk->thread.vm86)
                return;
 
        bit = (address - 0xA0000) >> PAGE_SHIFT;
        if (bit < 32)
-               tsk->thread.screen_bitmap |= 1 << bit;
+               tsk->thread.vm86->screen_bitmap |= 1 << bit;
+#endif
 }
 
 static bool low_pfn(unsigned long pfn)