Commit cdcb6fa1 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Borislav Petkov

x86/fpu: Make WARN_ON_FPU() private

No point in being in global headers.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211015011539.628516182@linutronix.de
parent 34002571
...@@ -42,15 +42,6 @@ extern void fpu__init_system(struct cpuinfo_x86 *c); ...@@ -42,15 +42,6 @@ extern void fpu__init_system(struct cpuinfo_x86 *c);
extern void fpu__init_check_bugs(void); extern void fpu__init_check_bugs(void);
extern void fpu__resume_cpu(void); extern void fpu__resume_cpu(void);
/*
* Debugging facility:
*/
#ifdef CONFIG_X86_DEBUG_FPU
# define WARN_ON_FPU(x) WARN_ON_ONCE(x)
#else
# define WARN_ON_FPU(x) ({ (void)(x); 0; })
#endif
extern union fpregs_state init_fpstate; extern union fpregs_state init_fpstate;
extern void fpstate_init_user(union fpregs_state *state); extern void fpstate_init_user(union fpregs_state *state);
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <linux/sched/task.h> #include <linux/sched/task.h>
#include <linux/init.h> #include <linux/init.h>
#include "internal.h"
/* /*
* Initialize the registers found in all CPUs, CR0 and CR4: * Initialize the registers found in all CPUs, CR0 and CR4:
*/ */
......
...@@ -13,6 +13,12 @@ static __always_inline __pure bool use_fxsr(void) ...@@ -13,6 +13,12 @@ static __always_inline __pure bool use_fxsr(void)
return cpu_feature_enabled(X86_FEATURE_FXSR); return cpu_feature_enabled(X86_FEATURE_FXSR);
} }
#ifdef CONFIG_X86_DEBUG_FPU
# define WARN_ON_FPU(x) WARN_ON_ONCE(x)
#else
# define WARN_ON_FPU(x) ({ (void)(x); 0; })
#endif
/* Init functions */ /* Init functions */
extern void fpu__init_prepare_fx_sw_frame(void); extern void fpu__init_prepare_fx_sw_frame(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment