From 29ded52bd4c47a2d3b11afe1f96844b6dfdb23e1 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 11 Apr 2014 11:27:04 +0200 Subject: [PATCH] further prefetch cleanup - commit 630017f4 ("xen: x86 & generic: change to __builtin_prefetch()") removed the ARCH_HAS_PREFETCH{,W} defines, but left the ARCH_HAS_SPINLOCK_PREFETCH one in place - the x86 special casing code has always been dead due to the two respective CONFIG_* settings not getting defined anywhere Signed-off-by: Jan Beulich Acked-by: Ian Campbell Acked-by: Keir Fraser --- xen/include/asm-x86/processor.h | 28 ---------------------------- xen/include/xen/prefetch.h | 1 - 2 files changed, 29 deletions(-) diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h index f5e9eda1a8..ca37167d93 100644 --- a/xen/include/asm-x86/processor.h +++ b/xen/include/asm-x86/processor.h @@ -481,34 +481,6 @@ static always_inline void rep_nop(void) #define cpu_relax() rep_nop() -/* Prefetch instructions for Pentium III and AMD Athlon */ -#ifdef CONFIG_MPENTIUMIII - -#define ARCH_HAS_PREFETCH -extern always_inline void prefetch(const void *x) -{ - asm volatile ( "prefetchnta (%0)" : : "r"(x) ); -} - -#elif CONFIG_X86_USE_3DNOW - -#define ARCH_HAS_PREFETCH -#define ARCH_HAS_PREFETCHW -#define ARCH_HAS_SPINLOCK_PREFETCH - -extern always_inline void prefetch(const void *x) -{ - asm volatile ( "prefetch (%0)" : : "r"(x) ); -} - -extern always_inline void prefetchw(const void *x) -{ - asm volatile ( "prefetchw (%0)" : : "r"(x) ); -} -#define spin_lock_prefetch(x) prefetchw(x) - -#endif - void show_stack(struct cpu_user_regs *regs); void show_stack_overflow(unsigned int cpu, const struct cpu_user_regs *regs); void show_registers(struct cpu_user_regs *regs); diff --git a/xen/include/xen/prefetch.h b/xen/include/xen/prefetch.h index ba7399828e..85831f953f 100644 --- a/xen/include/xen/prefetch.h +++ b/xen/include/xen/prefetch.h @@ -42,7 +42,6 @@ #endif #ifndef ARCH_HAS_SPINLOCK_PREFETCH -#define ARCH_HAS_SPINLOCK_PREFETCH #define spin_lock_prefetch(x) prefetchw(x) #endif -- 2.39.5