xor: add missing vzeroupper to AVX code
Subsystems (2)
PATCH 1/1 xor: add missing vzeroupper to AVX code
commit 7b8fc26c40d6cf4c6751a045c9e42bbb7e78d81b upstream.
Since the AVX optimized XOR code uses YMM registers, execute vzeroupper before returning from it. This is needed to avoid degrading the performance of any later SSE code that may happen to be executed.
(Backported to the old organization of the XOR code.)
Fixes ea4d26ae24e5 ("raid5: add AVX optimized RAID5 checksumming")
Signed-off-by Eric Biggers <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
Cc Christoph Hellwig <[email protected]>
Cc <[email protected]>
--- arch/x86/include/asm/xor_avx.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/x86/include/asm/xor_avx.h +4 -0
@@ -50,6 +50,7 @@ do { \ p1 = (unsigned long *)((uintptr_t )p1 +512 ); } + asmvolatile ("vzeroupper" );kernel_fpu_end (); }
@@ -81,6 +82,7 @@ do { \ p2 = (unsigned long *)((uintptr_t )p2 +512 ); } + asmvolatile ("vzeroupper" );kernel_fpu_end (); }
@@ -116,6 +118,7 @@ do { \ p3 = (unsigned long *)((uintptr_t )p3 +512 ); } + asmvolatile ("vzeroupper" );kernel_fpu_end (); }
@@ -155,6 +158,7 @@ do { \ p4 = (unsigned long *)((uintptr_t )p4 +512 ); } + asmvolatile ("vzeroupper" );kernel_fpu_end (); }
base-commit: 5139929c698c273e07cb0635732f6a918a7b8e78
Signature · 1 line
2.56.0