Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/fpu: Mop up the internal.h leftovers

Move the global interfaces to api.h and the rest into the core.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211015011539.948837194@linutronix.de

authored by

Thomas Gleixner and committed by
Borislav Petkov
6415bb80 ff0c37e1

+14 -18
+10
arch/x86/include/asm/fpu/api.h
··· 110 110 111 111 static inline void update_pasid(void) { } 112 112 113 + /* Trap handling */ 114 + extern int fpu__exception_code(struct fpu *fpu, int trap_nr); 115 + extern void fpu_sync_fpstate(struct fpu *fpu); 116 + 117 + /* Boot, hotplug and resume */ 118 + extern void fpu__init_cpu(void); 119 + extern void fpu__init_system(struct cpuinfo_x86 *c); 120 + extern void fpu__init_check_bugs(void); 121 + extern void fpu__resume_cpu(void); 122 + 113 123 #ifdef CONFIG_MATH_EMULATION 114 124 extern void fpstate_init_soft(struct swregs_state *soft); 115 125 #else
-18
arch/x86/include/asm/fpu/internal.h
··· 23 23 #include <asm/cpufeature.h> 24 24 #include <asm/trace/fpu.h> 25 25 26 - /* 27 - * High level FPU state handling functions: 28 - */ 29 - extern void fpu__clear_user_states(struct fpu *fpu); 30 - extern int fpu__exception_code(struct fpu *fpu, int trap_nr); 31 - 32 - extern void fpu_sync_fpstate(struct fpu *fpu); 33 - 34 - /* 35 - * Boot time FPU initialization functions: 36 - */ 37 - extern void fpu__init_cpu(void); 38 - extern void fpu__init_system_xstate(void); 39 - extern void fpu__init_cpu_xstate(void); 40 - extern void fpu__init_system(struct cpuinfo_x86 *c); 41 - extern void fpu__init_check_bugs(void); 42 - extern void fpu__resume_cpu(void); 43 - 44 26 #endif /* _ASM_X86_FPU_INTERNAL_H */
+1
arch/x86/kernel/fpu/init.c
··· 12 12 13 13 #include "internal.h" 14 14 #include "legacy.h" 15 + #include "xstate.h" 15 16 16 17 /* 17 18 * Initialize the registers found in all CPUs, CR0 and CR4:
+3
arch/x86/kernel/fpu/xstate.h
··· 18 18 extern void __copy_xstate_to_uabi_buf(struct membuf to, struct xregs_state *xsave, 19 19 u32 pkru_val, enum xstate_copy_mode copy_mode); 20 20 21 + extern void fpu__init_cpu_xstate(void); 22 + extern void fpu__init_system_xstate(void); 23 + 21 24 /* XSAVE/XRSTOR wrapper functions */ 22 25 23 26 #ifdef CONFIG_X86_64