From 2d15517fbe4c6b3f31be709b56d76fb4da1fd66d Mon Sep 17 00:00:00 2001 From: Zbigniew Zdanowicz Date: Mon, 22 Jan 2024 16:49:41 +0000 Subject: [PATCH] feature: enable use of waitpkg intrinsic Related-To: NEO-9737 Signed-off-by: Zbigniew Zdanowicz --- shared/source/utilities/wait_util.cpp | 2 +- .../unit_test/utilities/x86_64/wait_util_tests_x86_64.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/source/utilities/wait_util.cpp b/shared/source/utilities/wait_util.cpp index 1bd7ba0e9d..1a1159d471 100644 --- a/shared/source/utilities/wait_util.cpp +++ b/shared/source/utilities/wait_util.cpp @@ -16,7 +16,7 @@ namespace WaitUtils { constexpr uint64_t defaultCounterValue = 10000; constexpr uint32_t defaultControlValue = 0; -constexpr bool defaultEnableWaitPkg = false; +constexpr bool defaultEnableWaitPkg = true; uint64_t waitpkgCounterValue = defaultCounterValue; uint32_t waitpkgControlValue = defaultControlValue; diff --git a/shared/test/unit_test/utilities/x86_64/wait_util_tests_x86_64.cpp b/shared/test/unit_test/utilities/x86_64/wait_util_tests_x86_64.cpp index d36ddc6363..6f5cf49c38 100644 --- a/shared/test/unit_test/utilities/x86_64/wait_util_tests_x86_64.cpp +++ b/shared/test/unit_test/utilities/x86_64/wait_util_tests_x86_64.cpp @@ -111,7 +111,7 @@ struct WaitPkgEnabledFixture : public WaitPkgFixture { using WaitPkgTest = Test; using WaitPkgEnabledTest = Test; -TEST_F(WaitPkgTest, givenDefaultSettingsAndWaitpkgSupportTrueWhenWaitInitializedThenWaitPkgNotEnabled) { +TEST_F(WaitPkgTest, givenDefaultSettingsAndWaitpkgSupportTrueWhenWaitInitializedThenWaitPkgEnabled) { CpuInfo::cpuidFunc = mockCpuidEnableAll; EXPECT_EQ(WaitUtils::defaultWaitCount, WaitUtils::waitCount); @@ -124,10 +124,10 @@ TEST_F(WaitPkgTest, givenDefaultSettingsAndWaitpkgSupportTrueWhenWaitInitialized WaitUtils::waitpkgSupport = true; WaitUtils::init(); - EXPECT_EQ(WaitUtils::defaultWaitCount, WaitUtils::waitCount); + EXPECT_EQ(0u, WaitUtils::waitCount); EXPECT_EQ(10000u, WaitUtils::waitpkgCounterValue); EXPECT_EQ(0u, WaitUtils::waitpkgControlValue); - EXPECT_FALSE(WaitUtils::waitpkgUse); + EXPECT_TRUE(WaitUtils::waitpkgUse); } TEST_F(WaitPkgTest, givenEnabledWaitPkgSettingsAndWaitpkgSupportFalseWhenWaitInitializedThenWaitPkgNotEnabled) {