diff options
Diffstat (limited to 'arch/x86/include/asm/fpu-internal.h')
-rw-r--r-- | arch/x86/include/asm/fpu-internal.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/include/asm/fpu-internal.h b/arch/x86/include/asm/fpu-internal.h index e97622f57722..0dbc08282291 100644 --- a/arch/x86/include/asm/fpu-internal.h +++ b/arch/x86/include/asm/fpu-internal.h | |||
@@ -207,7 +207,7 @@ static inline void fpu_fxsave(struct fpu *fpu) | |||
207 | if (config_enabled(CONFIG_X86_32)) | 207 | if (config_enabled(CONFIG_X86_32)) |
208 | asm volatile( "fxsave %[fx]" : [fx] "=m" (fpu->state->fxsave)); | 208 | asm volatile( "fxsave %[fx]" : [fx] "=m" (fpu->state->fxsave)); |
209 | else if (config_enabled(CONFIG_AS_FXSAVEQ)) | 209 | else if (config_enabled(CONFIG_AS_FXSAVEQ)) |
210 | asm volatile("fxsaveq %0" : "=m" (fpu->state->fxsave)); | 210 | asm volatile("fxsaveq %[fx]" : [fx] "=m" (fpu->state->fxsave)); |
211 | else { | 211 | else { |
212 | /* Using "rex64; fxsave %0" is broken because, if the memory | 212 | /* Using "rex64; fxsave %0" is broken because, if the memory |
213 | * operand uses any extended registers for addressing, a second | 213 | * operand uses any extended registers for addressing, a second |
@@ -290,9 +290,11 @@ static inline int fpu_restore_checking(struct fpu *fpu) | |||
290 | 290 | ||
291 | static inline int restore_fpu_checking(struct task_struct *tsk) | 291 | static inline int restore_fpu_checking(struct task_struct *tsk) |
292 | { | 292 | { |
293 | /* AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception | 293 | /* |
294 | is pending. Clear the x87 state here by setting it to fixed | 294 | * AMD K7/K8 CPUs don't save/restore FDP/FIP/FOP unless an exception is |
295 | values. "m" is a random variable that should be in L1 */ | 295 | * pending. Clear the x87 state here by setting it to fixed values. |
296 | * "m" is a random variable that should be in L1. | ||
297 | */ | ||
296 | if (unlikely(static_cpu_has_bug_safe(X86_BUG_FXSAVE_LEAK))) { | 298 | if (unlikely(static_cpu_has_bug_safe(X86_BUG_FXSAVE_LEAK))) { |
297 | asm volatile( | 299 | asm volatile( |
298 | "fnclex\n\t" | 300 | "fnclex\n\t" |