mirror of
https://git.proxmox.com/git/mirror_ubuntu-kernels.git
synced 2026-01-06 22:46:35 +00:00
No point in being in global headers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20211015011539.628516182@linutronix.de
26 lines
555 B
C
26 lines
555 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#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);
|
|
}
|
|
|
|
#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 */
|
|
extern void fpu__init_prepare_fx_sw_frame(void);
|
|
|
|
#endif
|