Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/raid6: correctly check for assembler capabilities

Just like for AVX2 (which simply needs an #if -> #ifdef conversion),
SSSE3 assembler support should be checked for before using it.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: Jim Kukunas <james.t.kukunas@linux.intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: NeilBrown <neilb@suse.de>

authored by

Jan Beulich and committed by
NeilBrown
75aaf4c3 d9590143

+9 -2
+1
arch/x86/Makefile
··· 148 148 149 149 # does binutils support specific instructions? 150 150 asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1) 151 + asinstr += $(call as-instr,pshufb %xmm0$(comma)%xmm0,-DCONFIG_AS_SSSE3=1) 151 152 asinstr += $(call as-instr,crc32l %eax$(comma)%eax,-DCONFIG_AS_CRC32=1) 152 153 avx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1) 153 154 avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
+1 -1
lib/raid6/algos.c
··· 89 89 EXPORT_SYMBOL_GPL(raid6_datap_recov); 90 90 91 91 const struct raid6_recov_calls *const raid6_recov_algos[] = { 92 - #if (defined(__i386__) || defined(__x86_64__)) && !defined(__arch_um__) 93 92 #ifdef CONFIG_AS_AVX2 94 93 &raid6_recov_avx2, 95 94 #endif 95 + #ifdef CONFIG_AS_SSSE3 96 96 &raid6_recov_ssse3, 97 97 #endif 98 98 &raid6_recov_intx1,
+1 -1
lib/raid6/recov_avx2.c
··· 8 8 * of the License. 9 9 */ 10 10 11 - #if CONFIG_AS_AVX2 11 + #ifdef CONFIG_AS_AVX2 12 12 13 13 #include <linux/raid/pq.h> 14 14 #include "x86.h"
+6
lib/raid6/recov_ssse3.c
··· 7 7 * of the License. 8 8 */ 9 9 10 + #ifdef CONFIG_AS_SSSE3 11 + 10 12 #include <linux/raid/pq.h> 11 13 #include "x86.h" 12 14 ··· 332 330 #endif 333 331 .priority = 1, 334 332 }; 333 + 334 + #else 335 + #warning "your version of binutils lacks SSSE3 support" 336 + #endif