[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240529032059.899347-2-youling.tang@linux.dev>
Date: Wed, 29 May 2024 11:20:59 +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 2/2] prefetch: Add ARCH_HAS_PREFETCH definition when the architecture is not defined
From: Youling Tang <tangyouling@...inos.cn>
After commit ab483570a13b ("x86 & generic: change to __builtin_prefetch()"), the
__builtin_prefetch implementation will be used by default, so add its definition
to return to a state similar to before commit[1].
Currently prefetch_range() will be empty implemented under the x86_64 architecture,
there was a concrete implementation before "x86 & generic: change to
__builtin_prefetch()", so fix it.
No similar changes have been made to ARCH_HAS_PREFETCHW at this time.
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git/commit/include/linux/prefetch.h?id=8e4f2fd31bf737abb392e694898a1496157623b5
Fixes: ab483570a13b ("x86 & generic: change to __builtin_prefetch()")
Signed-off-by: Youling Tang <tangyouling@...inos.cn>
---
include/linux/prefetch.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/prefetch.h b/include/linux/prefetch.h
index b068e2e60939..162b7105e37c 100644
--- a/include/linux/prefetch.h
+++ b/include/linux/prefetch.h
@@ -36,6 +36,7 @@ struct page;
*/
#ifndef ARCH_HAS_PREFETCH
+#define ARCH_HAS_PREFETCH
#define prefetch(x) __builtin_prefetch(x)
#endif
--
2.34.1
Powered by blists - more mailing lists