aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/tbb/tbb/0001-Disable-use-of-_tpause-instruction.patch
blob: 7a4cc3e4e3db6911040291ad777bec731c1a772e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 26bc87fdad9f29c00a5e37d6d9aed7f6dc7ff416 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anuj.mittal@intel.com>
Date: Mon, 12 Apr 2021 14:15:53 +0800
Subject: [PATCH] Disable use of _tpause instruction

It is assuming right now that WAITPKG instructions are available when using
gcc 11 or clang 12. It's possible that we are building for a
CPU where it's not available - in this case anything older than Alder Lake.

Disable for now until the detection isn't fixed upstream.

Upstream-Status: Inappropriate

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 src/tbb/scheduler_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tbb/scheduler_common.h b/src/tbb/scheduler_common.h
index ee13dbf9..49052001 100644
--- a/src/tbb/scheduler_common.h
+++ b/src/tbb/scheduler_common.h
@@ -219,7 +219,7 @@ inline void prolonged_pause_impl() {
 #endif
 
 inline void prolonged_pause() {
-#if __TBB_WAITPKG_INTRINSICS_PRESENT && (_WIN32 || _WIN64 || __linux__) && (__TBB_x86_32 || __TBB_x86_64)
+#if 0
     if (governor::wait_package_enabled()) {
         std::uint64_t time_stamp = machine_time_stamp();
         // _tpause function directs the processor to enter an implementation-dependent optimized state
-- 
2.29.0