[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <163493259093.626.13694318187887947288.tip-bot2@tip-bot2>
Date: Fri, 22 Oct 2021 19:56:30 -0000
From: "tip-bot2 for Thomas Gleixner" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Thomas Gleixner <tglx@...utronix.de>, Borislav Petkov <bp@...e.de>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/fpu] x86/fpu: Cleanup fpu__init_system_xstate_size_legacy()
The following commit has been merged into the x86/fpu branch of tip:
Commit-ID: 617473acdfe45aa9aa2be23cd5b02da7cd2717f8
Gitweb: https://git.kernel.org/tip/617473acdfe45aa9aa2be23cd5b02da7cd2717f8
Author: Thomas Gleixner <tglx@...utronix.de>
AuthorDate: Fri, 15 Oct 2021 01:09:31 +02:00
Committer: Borislav Petkov <bp@...e.de>
CommitterDate: Thu, 21 Oct 2021 19:18:43 +02:00
x86/fpu: Cleanup fpu__init_system_xstate_size_legacy()
Clean the function up before making changes.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Signed-off-by: Borislav Petkov <bp@...e.de>
Link: https://lkml.kernel.org/r/20211014230739.184014242@linutronix.de
---
arch/x86/kernel/fpu/init.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kernel/fpu/init.c b/arch/x86/kernel/fpu/init.c
index 65d763f..c9293ad 100644
--- a/arch/x86/kernel/fpu/init.c
+++ b/arch/x86/kernel/fpu/init.c
@@ -199,17 +199,12 @@ static void __init fpu__init_system_xstate_size_legacy(void)
* Note that xstate sizes might be overwritten later during
* fpu__init_system_xstate().
*/
-
- if (!boot_cpu_has(X86_FEATURE_FPU)) {
+ if (!cpu_feature_enabled(X86_FEATURE_FPU))
fpu_kernel_xstate_size = sizeof(struct swregs_state);
- } else {
- if (boot_cpu_has(X86_FEATURE_FXSR))
- fpu_kernel_xstate_size =
- sizeof(struct fxregs_state);
- else
- fpu_kernel_xstate_size =
- sizeof(struct fregs_state);
- }
+ else if (cpu_feature_enabled(X86_FEATURE_FXSR))
+ fpu_kernel_xstate_size = sizeof(struct fxregs_state);
+ else
+ fpu_kernel_xstate_size = sizeof(struct fregs_state);
fpu_user_xstate_size = fpu_kernel_xstate_size;
fpstate_reset(¤t->thread.fpu);
Powered by blists - more mailing lists