diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-07-26 09:11:56 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-11 15:38:22 -0700 |
commit | 9f65bf026312945f8dfd76a2c6573dd0d81488ed (patch) | |
tree | 256c36717444bfae43a694da4b05308991150d53 /kernel | |
parent | e8fbebf6feda80eca5bd8b0afc4dba86ae3b2ff5 (diff) | |
download | kernel_samsung_espresso10-9f65bf026312945f8dfd76a2c6573dd0d81488ed.zip kernel_samsung_espresso10-9f65bf026312945f8dfd76a2c6573dd0d81488ed.tar.gz kernel_samsung_espresso10-9f65bf026312945f8dfd76a2c6573dd0d81488ed.tar.bz2 |
x86, fpu: correct the asm constraints for fxsave, unbreak mxcsr.daz
commit eaa5a990191d204ba0f9d35dbe5505ec2cdd1460 upstream.
GCC will optimize mxcsr_feature_mask_init in arch/x86/kernel/i387.c:
memset(&fx_scratch, 0, sizeof(struct i387_fxsave_struct));
asm volatile("fxsave %0" : : "m" (fx_scratch));
mask = fx_scratch.mxcsr_mask;
if (mask == 0)
mask = 0x0000ffbf;
to
memset(&fx_scratch, 0, sizeof(struct i387_fxsave_struct));
asm volatile("fxsave %0" : : "m" (fx_scratch));
mask = 0x0000ffbf;
since asm statement doesn’t say it will update fx_scratch. As the
result, the DAZ bit will be cleared. This patch fixes it. This bug
dates back to at least kernel 2.6.12.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions