Thread (4 messages) 4 messages, 3 authors, 2018-07-26

Re: [rfc 4.16-rt patch] arm64: efi,fpsimd: use a local_lock() in efi_virtmap_load()

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2018-07-12 01:15:56

On Wed, 11 Jul 2018 17:07:22 +0200
Mike Galbraith [off-list ref] wrote:
quoted hunk ↗ jump to hunk
--- a/arch/arm64/kernel/fpsimd.c
+++ b/arch/arm64/kernel/fpsimd.c
@@ -607,8 +607,8 @@ int sve_set_vector_length(struct task_st
 		sve_to_fpsimd(task);
 
 	if (task == current) {
-		local_unlock(fpsimd_lock);
 		local_bh_enable();
+		local_unlock(fpsimd_lock);
 	}
 
 	/*
@@ -841,8 +841,8 @@ asmlinkage void do_sve_acc(unsigned int
 
 	sve_alloc(current);
 
-	local_bh_disable();
 	local_lock(fpsimd_lock);
+	local_bh_disable();
 
 	task_fpsimd_save();
 	fpsimd_to_sve(current);
@@ -854,8 +854,8 @@ asmlinkage void do_sve_acc(unsigned int
 	if (test_and_set_thread_flag(TIF_SVE))
 		WARN_ON(1); /* SVE access shouldn't have trapped */
 
-	local_unlock(fpsimd_lock);
 	local_bh_enable();
+	local_unlock(fpsimd_lock);
 }
 
We really need to have a local_lock_bh(...)

-- Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help