File Index
Files and directories
Sign in
FILE

internal.h

File preview with syntax highlighting.

linux-6.19.14/arch/x86/kernel/fpu/internal.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef __X86_KERNEL_FPU_INTERNAL_H
 3#define __X86_KERNEL_FPU_INTERNAL_H
 4
 5extern struct fpstate init_fpstate;
 6
 7/* CPU feature check wrappers */
 8static __always_inline __pure bool use_xsave(void)
 9{
10	return cpu_feature_enabled(X86_FEATURE_XSAVE);
11}
12
13static __always_inline __pure bool use_fxsr(void)
14{
15	return cpu_feature_enabled(X86_FEATURE_FXSR);
16}
17
18#ifdef CONFIG_X86_DEBUG_FPU
19# define WARN_ON_FPU(x) WARN_ON_ONCE(x)
20#else
21# define WARN_ON_FPU(x) ({ BUILD_BUG_ON_INVALID(x); 0; })
22#endif
23
24/* Used in init.c */
25extern void fpstate_init_user(struct fpstate *fpstate);
26extern void fpstate_reset(struct fpu *fpu);
27
28#endif
~/ Read-only file preview.