public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] x86: Remove the prefetch() specific implementation on x86_64
@ 2024-05-29  3:20 Youling Tang
  2024-05-29  3:20 ` [PATCH 2/2] prefetch: Add ARCH_HAS_PREFETCH definition when the architecture is not defined Youling Tang
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Youling Tang @ 2024-05-29  3:20 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen
  Cc: x86, linux-kernel, Mateusz Guzik, Youling Tang

From: Youling Tang <tangyouling@kylinos.cn>

After commit ab483570a13b ("x86 & generic: change to __builtin_prefetch()"),
x86_64 directly uses __builtin_prefetch() without the specific implementation
of prefetch(). Also, x86_64 use a generic definition until commit ae2e15eb3b6c
("x86: unify prefetch operations"). So remove it.

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
---
 arch/x86/include/asm/processor.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index cb4f6c513c48..44371bdcc59d 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -599,9 +599,6 @@ extern char			ignore_fpu_irq;
 #ifdef CONFIG_X86_32
 # define BASE_PREFETCH		""
 # define ARCH_HAS_PREFETCH
-#else
-# define BASE_PREFETCH		"prefetcht0 %1"
-#endif
 
 /*
  * Prefetch instructions for Pentium III (+) and AMD Athlon (+)
@@ -616,6 +613,10 @@ static inline void prefetch(const void *x)
 			  "m" (*(const char *)x));
 }
 
+#else
+# define BASE_PREFETCH		"prefetcht0 %1"
+#endif
+
 /*
  * 3dnow prefetch to get an exclusive cache line.
  * Useful for spinlocks to avoid one state transition in the
-- 
2.34.1


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

end of thread, other threads:[~2024-07-24  7:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-29  3:20 [PATCH 1/2] x86: Remove the prefetch() specific implementation on x86_64 Youling Tang
2024-05-29  3:20 ` [PATCH 2/2] prefetch: Add ARCH_HAS_PREFETCH definition when the architecture is not defined Youling Tang
2024-05-30 15:30   ` Nikolay Borisov
2024-05-29 20:03 ` [PATCH 1/2] x86: Remove the prefetch() specific implementation on x86_64 kernel test robot
2024-05-30  1:51   ` Youling Tang
2024-05-30 15:26 ` Nikolay Borisov
2024-05-31  1:17   ` Youling Tang
2024-07-24  7:45   ` Youling Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox