Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 1 | From 26bc87fdad9f29c00a5e37d6d9aed7f6dc7ff416 Mon Sep 17 00:00:00 2001 |
| 2 | From: Anuj Mittal <anuj.mittal@intel.com> |
| 3 | Date: Mon, 12 Apr 2021 14:15:53 +0800 |
| 4 | Subject: [PATCH] Disable use of _tpause instruction |
| 5 | |
| 6 | It is assuming right now that WAITPKG instructions are available when using |
| 7 | gcc 11 or clang 12. It's possible that we are building for a |
| 8 | CPU where it's not available - in this case anything older than Alder Lake. |
| 9 | |
| 10 | Disable for now until the detection isn't fixed upstream. |
| 11 | |
| 12 | Upstream-Status: Inappropriate |
| 13 | |
| 14 | Signed-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 Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 19 | --- a/src/tbb/scheduler_common.h |
| 20 | +++ b/src/tbb/scheduler_common.h |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 21 | @@ -220,7 +220,7 @@ inline void prolonged_pause_impl() { |
Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 22 | #endif |
| 23 | |
| 24 | inline void prolonged_pause() { |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 25 | -#if __TBB_WAITPKG_INTRINSICS_PRESENT && (_WIN32 || _WIN64 || __unix__) && (__TBB_x86_32 || __TBB_x86_64) |
Andrew Geissler | e34f896 | 2021-04-15 15:53:51 -0500 | [diff] [blame] | 26 | +#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 |