Lines Matching +full:current +full:- +full:mode
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
17 #include <asm/cpu-features.h>
22 #include <asm/current.h>
30 * This enum specifies a mode in which we want the FPU to operate, for cores
54 static inline int __enable_fpu(enum fpu_mode mode) in __enable_fpu() argument
58 switch (mode) { in __enable_fpu()
60 /* just enable the FPU in its current mode */ in __enable_fpu()
76 /* we only have a 32-bit FPU */ in __enable_fpu()
87 fr = (int)mode & FPU_FR_MASK; in __enable_fpu()
120 enum fpu_mode mode; in __own_fpu() local
124 mode = FPU_HYBRID; in __own_fpu()
126 mode = !test_thread_flag(TIF_32BIT_FPREGS); in __own_fpu()
128 ret = __enable_fpu(mode); in __own_fpu()
132 KSTK_STATUS(current) |= ST0_CU1; in __own_fpu()
133 if (mode == FPU_64BIT || mode == FPU_HYBRID) in __own_fpu()
134 KSTK_STATUS(current) |= ST0_FR; in __own_fpu()
135 else /* mode == FPU_32BIT */ in __own_fpu()
136 KSTK_STATUS(current) &= ~ST0_FR; in __own_fpu()
149 _restore_fp(current); in own_fpu_inatomic()
169 tsk->thread.fpu.fcr31 = in lose_fpu_inatomic()
191 lose_fpu_inatomic(save, current); in lose_fpu()
196 * init_fp_ctx() - Initialize task FP context
213 memset(&target->thread.fpu.fpr, ~0, sizeof(target->thread.fpu.fpr)); in init_fp_ctx()
241 if (tsk == current) { in get_fpu_regs()
244 _save_fp(current); in get_fpu_regs()
248 return tsk->thread.fpu.fpr; in get_fpu_regs()
258 static inline int __enable_fpu(enum fpu_mode mode) in __enable_fpu() argument
265 /* no-op */ in __disable_fpu()
276 /* no-op */ in clear_fpu_owner()
291 /* no-op */ in lose_fpu_inatomic()
296 /* no-op */ in lose_fpu()