sched/preempt, powerpc: Disable preemption in enable_kernel_altivec() explicitly
enable_kernel_altivec() has to be called with disabled preemption. Let's make this explicit, to prepare for pagefault_disable() not touching preemption anymore. Reviewed-and-tested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David.Laight@ACULAB.COM Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: airlied@linux.ie Cc: akpm@linux-foundation.org Cc: bigeasy@linutronix.de Cc: borntraeger@de.ibm.com Cc: daniel.vetter@intel.com Cc: heiko.carstens@de.ibm.com Cc: herbert@gondor.apana.org.au Cc: hocko@suse.cz Cc: hughd@google.com Cc: mst@redhat.com Cc: paulus@samba.org Cc: ralf@linux-mips.org Cc: schwidefsky@de.ibm.com Cc: yang.shi@windriver.com Link: http://lkml.kernel.org/r/1431359540-32227-14-git-send-email-dahi@linux.vnet.ibm.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
2f09b227ee
commit
5f76eea88d
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user