# define WARN_ON_FPU(x) ({ (void)(x); 0; })
#endif
-/*
- * FPU related CPU feature flag helper routines:
- */
-static __always_inline __pure bool use_xsaveopt(void)
-{
- return static_cpu_has(X86_FEATURE_XSAVEOPT);
-}
-
-static __always_inline __pure bool use_xsave(void)
-{
- return static_cpu_has(X86_FEATURE_XSAVE);
-}
-
-static __always_inline __pure bool use_fxsr(void)
-{
- return static_cpu_has(X86_FEATURE_FXSR);
-}
-
extern union fpregs_state init_fpstate;
extern void fpstate_init_user(union fpregs_state *state);
#include <linux/hardirq.h>
#include <linux/pkeys.h>
+#include "internal.h"
#include "xstate.h"
#define CREATE_TRACE_POINTS
#ifndef __X86_KERNEL_FPU_INTERNAL_H
#define __X86_KERNEL_FPU_INTERNAL_H
+/* CPU feature check wrappers */
+static __always_inline __pure bool use_xsave(void)
+{
+ return cpu_feature_enabled(X86_FEATURE_XSAVE);
+}
+
+static __always_inline __pure bool use_fxsr(void)
+{
+ return cpu_feature_enabled(X86_FEATURE_FXSR);
+}
+
/* Init functions */
extern void fpu__init_prepare_fx_sw_frame(void);
#include <asm/fpu/regset.h>
#include <asm/fpu/xstate.h>
+#include "internal.h"
+
/*
* The xstateregs_active() routine is the same as the regset_fpregs_active() routine,
* as the "regset->n" for the xstate regset will be updated based on the feature