this_cpu_write(in_kernel_fpu, true);
}
-static void kernel_fpu_enable(void)
-{
- WARN_ON_FPU(!this_cpu_read(in_kernel_fpu));
- this_cpu_write(in_kernel_fpu, false);
-}
-
static bool kernel_fpu_disabled(void)
{
return this_cpu_read(in_kernel_fpu);
__cpu_invalidate_fpregs_state();
}
-static void __kernel_fpu_end(void)
-{
- kernel_fpu_enable();
-}
-
void kernel_fpu_begin(void)
{
preempt_disable();
void kernel_fpu_end(void)
{
- __kernel_fpu_end();
+ WARN_ON_FPU(!this_cpu_read(in_kernel_fpu));
+
+ this_cpu_write(in_kernel_fpu, false);
preempt_enable();
}
EXPORT_SYMBOL_GPL(kernel_fpu_end);