]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
x86/fpu: Move fpstate functions to api.h
authorThomas Gleixner <tglx@linutronix.de>
Fri, 15 Oct 2021 01:16:33 +0000 (03:16 +0200)
committerBorislav Petkov <bp@suse.de>
Wed, 20 Oct 2021 13:27:28 +0000 (15:27 +0200)
Move function declarations which need to be globally available to api.h
where they belong.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211015011539.792363754@linutronix.de
arch/x86/include/asm/fpu/api.h
arch/x86/include/asm/fpu/internal.h
arch/x86/kernel/fpu/internal.h
arch/x86/math-emu/fpu_entry.c

index 77a732ea4cdaec22c7108d864dff451f5c11ad17..56cf884ecdaebe2b11b57a079217d6ca51cd2de7 100644 (file)
@@ -110,6 +110,15 @@ extern int cpu_has_xfeatures(u64 xfeatures_mask, const char **feature_name);
 
 static inline void update_pasid(void) { }
 
+#ifdef CONFIG_MATH_EMULATION
+extern void fpstate_init_soft(struct swregs_state *soft);
+#else
+static inline void fpstate_init_soft(struct swregs_state *soft) {}
+#endif
+
+/* fpstate */
+extern union fpregs_state init_fpstate;
+
 /* fpstate-related functions which are exported to KVM */
 extern void fpu_init_fpstate_user(struct fpu *fpu);
 
index 74b7cc3d2e77222409de848b9fef1350e5d794b5..d8bb49134ebb59ad81fd99b4ca59e257f3d84c10 100644 (file)
@@ -42,15 +42,6 @@ extern void fpu__init_system(struct cpuinfo_x86 *c);
 extern void fpu__init_check_bugs(void);
 extern void fpu__resume_cpu(void);
 
-extern union fpregs_state init_fpstate;
-extern void fpstate_init_user(union fpregs_state *state);
-
-#ifdef CONFIG_MATH_EMULATION
-extern void fpstate_init_soft(struct swregs_state *soft);
-#else
-static inline void fpstate_init_soft(struct swregs_state *soft) {}
-#endif
-
 extern void restore_fpregs_from_fpstate(union fpregs_state *fpstate, u64 mask);
 
 extern bool copy_fpstate_to_sigframe(void __user *buf, void __user *fp, int size);
index 5ddc09e03c2a493a4d85ab4b5caa0d941edf37b7..bd7f813242dd76080ebc97f64f7716a1a15411ee 100644 (file)
@@ -22,4 +22,7 @@ static __always_inline __pure bool use_fxsr(void)
 /* Init functions */
 extern void fpu__init_prepare_fx_sw_frame(void);
 
+/* Used in init.c */
+extern void fpstate_init_user(union fpregs_state *state);
+
 #endif
index 8679a9d6c47f92de8c2f77ee1e2397032bb957be..50195e24975368190c1b9850f2a3a1a7eea79a4a 100644 (file)
@@ -31,7 +31,7 @@
 #include <linux/uaccess.h>
 #include <asm/traps.h>
 #include <asm/user.h>
-#include <asm/fpu/internal.h>
+#include <asm/fpu/api.h>
 
 #include "fpu_system.h"
 #include "fpu_emu.h"