[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240529032059.899347-1-youling.tang@linux.dev>
Date: Wed, 29 May 2024 11:20:58 +0800
From: Youling Tang <youling.tang@...ux.dev>
To: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>
Cc: x86@...nel.org,
linux-kernel@...r.kernel.org,
Mateusz Guzik <mjguzik@...il.com>,
Youling Tang <tangyouling@...inos.cn>
Subject: [PATCH 1/2] x86: Remove the prefetch() specific implementation on x86_64
From: Youling Tang <tangyouling@...inos.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@...inos.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
Powered by blists - more mailing lists