aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/string_32.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-11-15 17:46:39 +0100
committerPeter Zijlstra <peterz@infradead.org>2021-12-11 09:09:45 +0100
commitc6dbd3e5e69cf3ca47a3864115d4cbdd44619243 (patch)
tree1b0c415e73a50ff8f0e036856c325ceccf0db483 /arch/x86/include/asm/string_32.h
parentbitfield.h: Fix "type of reg too small for mask" test (diff)
downloadlinux-dev-c6dbd3e5e69cf3ca47a3864115d4cbdd44619243.tar.xz
linux-dev-c6dbd3e5e69cf3ca47a3864115d4cbdd44619243.zip
x86/mmx_32: Remove X86_USE_3DNOW
This code puts an exception table entry on the PREFETCH instruction to overwrite it with a JMP.d8 when it triggers an exception. Except of course, our code is no longer writable, also SMP. Instead of fixing this broken mess, simply take it out. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/YZKQzUmeNuwyvZpk@hirez.programming.kicks-ass.net
Diffstat (limited to 'arch/x86/include/asm/string_32.h')
-rw-r--r--arch/x86/include/asm/string_32.h33
1 files changed, 0 insertions, 33 deletions
diff --git a/arch/x86/include/asm/string_32.h b/arch/x86/include/asm/string_32.h
index f74362b05619..32c0d981a82a 100644
--- a/arch/x86/include/asm/string_32.h
+++ b/arch/x86/include/asm/string_32.h
@@ -146,42 +146,9 @@ static __always_inline void *__constant_memcpy(void *to, const void *from,
extern void *memcpy(void *, const void *, size_t);
#ifndef CONFIG_FORTIFY_SOURCE
-#ifdef CONFIG_X86_USE_3DNOW
-
-#include <asm/mmx.h>
-
-/*
- * This CPU favours 3DNow strongly (eg AMD Athlon)
- */
-
-static inline void *__constant_memcpy3d(void *to, const void *from, size_t len)
-{
- if (len < 512)
- return __constant_memcpy(to, from, len);
- return _mmx_memcpy(to, from, len);
-}
-
-static inline void *__memcpy3d(void *to, const void *from, size_t len)
-{
- if (len < 512)
- return __memcpy(to, from, len);
- return _mmx_memcpy(to, from, len);
-}
-
-#define memcpy(t, f, n) \
- (__builtin_constant_p((n)) \
- ? __constant_memcpy3d((t), (f), (n)) \
- : __memcpy3d((t), (f), (n)))
-
-#else
-
-/*
- * No 3D Now!
- */
#define memcpy(t, f, n) __builtin_memcpy(t, f, n)
-#endif
#endif /* !CONFIG_FORTIFY_SOURCE */
#define __HAVE_ARCH_MEMMOVE