All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] further prefetch cleanup
@ 2014-04-08 12:57 Jan Beulich
  2014-04-08 13:05 ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2014-04-08 12:57 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser

[-- Attachment #1: Type: text/plain, Size: 1643 bytes --]

- 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@suse.com>

--- 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 #2: prefetch-cleanup.patch --]
[-- Type: text/plain, Size: 1665 bytes --]

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@suse.com>

--- 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 #3: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-10 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08 12:57 [PATCH] further prefetch cleanup Jan Beulich
2014-04-08 13:05 ` Ian Campbell
2014-04-10 15:56   ` Keir Fraser

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.