[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [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 <jbeulich@xxxxxxxx>

--- 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);
--- a/xen/include/xen/prefetch.h
+++ b/xen/include/xen/prefetch.h
@@ -42,7 +42,6 @@ static inline void prefetchw(const void 
 #endif
 
 #ifndef ARCH_HAS_SPINLOCK_PREFETCH
-#define ARCH_HAS_SPINLOCK_PREFETCH
 #define spin_lock_prefetch(x) prefetchw(x)
 #endif
 



Attachment: prefetch-cleanup.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.