#include <linux/cpu.h>
#include <linux/cpu_pm.h>
#include <linux/kernel.h>
-#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/signal.h>
static DEFINE_PER_CPU(struct fpsimd_state *, fpsimd_last_state);
static DEFINE_PER_CPU(int, fpsimd_stg_enable);
-static int fpsimd_settings = 0x1; /* default = 0x1 */
-module_param(fpsimd_settings, int, 0644);
-
/*
* Trapped FP/ASIMD access.
*/
void do_fpsimd_acc(unsigned int esr, struct pt_regs *regs)
{
- if (!fpsimd_settings)
- return;
-
fpsimd_disable_trap();
fpsimd_settings_disable();
this_cpu_write(fpsimd_stg_enable, 0);
void do_fpsimd_acc_compat(unsigned int esr, struct pt_regs *regs)
{
- if (!fpsimd_settings)
- return;
-
fpsimd_disable_trap();
fpsimd_settings_enable();
this_cpu_write(fpsimd_stg_enable, 1);
if (current->mm && !test_thread_flag(TIF_FOREIGN_FPSTATE))
fpsimd_save_state(¤t->thread.fpsimd_state);
- if (fpsimd_settings && __this_cpu_read(fpsimd_stg_enable)) {
+ if (__this_cpu_read(fpsimd_stg_enable)) {
fpsimd_settings_disable();
this_cpu_write(fpsimd_stg_enable, 0);
}
set_ti_thread_flag(task_thread_info(next),
TIF_FOREIGN_FPSTATE);
- if (!fpsimd_settings)
- return;
-
if (test_ti_thread_flag(task_thread_info(next), TIF_32BIT))
fpsimd_enable_trap();
else