Skip to content

Commit e3a33af

Browse files
BenjaminBeichlerrichardweinberger
authored andcommitted
um: fix and optimize xor select template for CONFIG64 and timetravel mode
Due to dropped inclusion of asm-generic/xor.h, xor_block_8regs symbol is missing with CONFIG64 and break compilation, as the asm/xor_64.h also did not include it. The patch recreate the logic from arch/x86, which check whether AVX is available and add fallbacks for 32bit and 64bit config of um. A very minor additional "fix" is, the return of the macro parameter instead of NULL, as this is the original intent of the macro, but this does not change the actual behavior. Fixes: c0ecca6 ("um: enable the use of optimized xor routines in UML") Signed-off-by: Benjamin Beichler <benjamin.beichler@uni-rostock.de> Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 6427c16 commit e3a33af

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

arch/um/include/asm/xor.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
#ifdef CONFIG_64BIT
66
#undef CONFIG_X86_32
7+
#define TT_CPU_INF_XOR_DEFAULT (AVX_SELECT(&xor_block_sse_pf64))
78
#else
89
#define CONFIG_X86_32 1
10+
#define TT_CPU_INF_XOR_DEFAULT (AVX_SELECT(&xor_block_8regs))
911
#endif
1012

1113
#include <asm/cpufeature.h>
@@ -16,7 +18,7 @@
1618
#undef XOR_SELECT_TEMPLATE
1719
/* pick an arbitrary one - measuring isn't possible with inf-cpu */
1820
#define XOR_SELECT_TEMPLATE(x) \
19-
(time_travel_mode == TT_MODE_INFCPU ? &xor_block_8regs : NULL)
21+
(time_travel_mode == TT_MODE_INFCPU ? TT_CPU_INF_XOR_DEFAULT : x))
2022
#endif
2123

2224
#endif

0 commit comments

Comments
 (0)