diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-06-29 12:04:17 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-06-29 12:04:17 -0700 |
| commit | 25c69bf35b1a493ab8c8aca28afd9bb9d0d5d26c (patch) | |
| tree | b186b8c104e3e94d06dc31d8305c47d6a8995194 /arch/x86/include/asm/fpu/internal.h | |
| parent | ae8a7e6903c2a6201226b3aabb0d7673c6a5f042 (diff) | |
| parent | 563a330876f64f5289d0886857947c7bd469f907 (diff) | |
Merge "Merge android-4.4.138 (07c0138) into msm-4.4"
Diffstat (limited to 'arch/x86/include/asm/fpu/internal.h')
| -rw-r--r-- | arch/x86/include/asm/fpu/internal.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index 3c3550c3a4a3..146d838e6ee7 100644 --- a/arch/x86/include/asm/fpu/internal.h +++ b/arch/x86/include/asm/fpu/internal.h @@ -42,6 +42,7 @@ extern void fpu__init_cpu_xstate(void); extern void fpu__init_system(struct cpuinfo_x86 *c); extern void fpu__init_check_bugs(void); extern void fpu__resume_cpu(void); +extern u64 fpu__get_supported_xfeatures_mask(void); /* * Debugging facility: @@ -57,7 +58,7 @@ extern void fpu__resume_cpu(void); */ static __always_inline __pure bool use_eager_fpu(void) { - return static_cpu_has_safe(X86_FEATURE_EAGER_FPU); + return true; } static __always_inline __pure bool use_xsaveopt(void) @@ -595,7 +596,8 @@ switch_fpu_prepare(struct fpu *old_fpu, struct fpu *new_fpu, int cpu) * If the task has used the math, pre-load the FPU on xsave processors * or if the past 5 consecutive context-switches used math. */ - fpu.preload = new_fpu->fpstate_active && + fpu.preload = static_cpu_has(X86_FEATURE_FPU) && + new_fpu->fpstate_active && (use_eager_fpu() || new_fpu->counter > 5); if (old_fpu->fpregs_active) { |
