[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a10b6a16cdad88170f546d008c77453cddf918e6@git.kernel.org>
Date: Tue, 26 Sep 2017 01:27:48 -0700
From: tip-bot for Ingo Molnar <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: oleg@...hat.com, hpa@...or.com, yu-cheng.yu@...el.com,
riel@...hat.com, linux-kernel@...r.kernel.org,
dave.hansen@...ux.intel.com, torvalds@...ux-foundation.org,
luto@...nel.org, mingo@...nel.org, fenghua.yu@...el.com,
peterz@...radead.org, tglx@...utronix.de,
akpm@...ux-foundation.org, ebiggers3@...il.com,
luto@...capital.net, bp@...en8.de
Subject: [tip:x86/fpu] x86/fpu: Make the fpu state change in fpu__clear()
scheduler-atomic
Commit-ID: a10b6a16cdad88170f546d008c77453cddf918e6
Gitweb: http://git.kernel.org/tip/a10b6a16cdad88170f546d008c77453cddf918e6
Author: Ingo Molnar <mingo@...nel.org>
AuthorDate: Sat, 23 Sep 2017 14:59:59 +0200
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Sun, 24 Sep 2017 13:04:33 +0200
x86/fpu: Make the fpu state change in fpu__clear() scheduler-atomic
Do this temporarily only, to make it easier to change the FPU state machine,
in particular this change couples the fpu->fpregs_active and fpu->fpstate_active
states: they are only set/cleared together (as far as the scheduler sees them).
This will be removed by later patches.
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Andy Lutomirski <luto@...capital.net>
Cc: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>
Cc: Eric Biggers <ebiggers3@...il.com>
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rik van Riel <riel@...hat.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Yu-cheng Yu <yu-cheng.yu@...el.com>
Link: http://lkml.kernel.org/r/20170923130016.21448-17-mingo@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/fpu/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index bad5724..b7dc383 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -462,9 +462,11 @@ void fpu__clear(struct fpu *fpu)
* Make sure fpstate is cleared and initialized.
*/
if (static_cpu_has(X86_FEATURE_FPU)) {
+ preempt_disable();
fpu__activate_curr(fpu);
user_fpu_begin();
copy_init_fpstate_to_fpregs();
+ preempt_enable();
}
}
Powered by blists - more mailing lists