| 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(-) |
| |
| --- a/src/tbb/scheduler_common.h |
| +++ b/src/tbb/scheduler_common.h |
| @@ -220,7 +220,7 @@ inline void prolonged_pause_impl() { |
| #endif |
| |
| inline void prolonged_pause() { |
| -#if __TBB_WAITPKG_INTRINSICS_PRESENT && (_WIN32 || _WIN64 || __unix__) && (__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 |