These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / powerpc / lib / vmx-helper.c
index 3cf529c..ac93a3b 100644 (file)
@@ -27,11 +27,11 @@ int enter_vmx_usercopy(void)
        if (in_interrupt())
                return 0;
 
-       /* This acts as preempt_disable() as well and will make
-        * enable_kernel_altivec(). We need to disable page faults
-        * as they can call schedule and thus make us lose the VMX
-        * context. So on page faults, we just fail which will cause
-        * a fallback to the normal non-vmx copy.
+       preempt_disable();
+       /*
+        * We need to disable page faults as they can call schedule and
+        * thus make us lose the VMX context. So on page faults, we just
+        * fail which will cause a fallback to the normal non-vmx copy.
         */
        pagefault_disable();
 
@@ -47,6 +47,7 @@ int enter_vmx_usercopy(void)
 int exit_vmx_usercopy(void)
 {
        pagefault_enable();
+       preempt_enable();
        return 0;
 }