blob: 78051d7eef543372cad711a34a6fdcee4b8aac00 [file] [log] [blame]
Andrew Geisslere34f8962021-04-15 15:53:51 -05001From 26bc87fdad9f29c00a5e37d6d9aed7f6dc7ff416 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Mon, 12 Apr 2021 14:15:53 +0800
4Subject: [PATCH] Disable use of _tpause instruction
5
6It is assuming right now that WAITPKG instructions are available when using
7gcc 11 or clang 12. It's possible that we are building for a
8CPU where it's not available - in this case anything older than Alder Lake.
9
10Disable for now until the detection isn't fixed upstream.
11
12Upstream-Status: Inappropriate
13
14Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
15---
16 src/tbb/scheduler_common.h | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
Andrew Geisslere34f8962021-04-15 15:53:51 -050019--- a/src/tbb/scheduler_common.h
20+++ b/src/tbb/scheduler_common.h
Andrew Geissler595f6302022-01-24 19:11:47 +000021@@ -220,7 +220,7 @@ inline void prolonged_pause_impl() {
Andrew Geisslere34f8962021-04-15 15:53:51 -050022 #endif
23
24 inline void prolonged_pause() {
Andrew Geissler595f6302022-01-24 19:11:47 +000025-#if __TBB_WAITPKG_INTRINSICS_PRESENT && (_WIN32 || _WIN64 || __unix__) && (__TBB_x86_32 || __TBB_x86_64)
Andrew Geisslere34f8962021-04-15 15:53:51 -050026+#if 0
27 if (governor::wait_package_enabled()) {
28 std::uint64_t time_stamp = machine_time_stamp();
29 // _tpause function directs the processor to enter an implementation-dependent optimized state