From: Ingo Molnar Date: Fri, 24 Apr 2015 08:49:11 +0000 (+0200) Subject: x86/fpu: Clean up and fix MXCSR handling X-Git-Tag: omap-for-v4.3/legacy-v2-signed~203^2~167 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91a8c2a5b43f;p=pandora-kernel.git x86/fpu: Clean up and fix MXCSR handling The code has the following problems: - it uses a single global 'fx_scratch' area that multiple CPUs could write into simultaneously, in theory. - it wastes 512 bytes of .data for something that is only rarely used. Fix this by moving the state buffer to the stack. Note that while this is 512 bytes, we don't ever call this function in very deep callchains, so its stack usage should not be a problem. Also add comments to explain the magic 0x0000ffbf default value. Reviewed-by: Borislav Petkov Cc: Andy Lutomirski Cc: Dave Hansen Cc: Fenghua Yu Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed