refactor: remove not needed volatile

Related-To: NEO-10767
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
Kamil Kopryk
2025-01-15 19:01:49 +00:00
committed by Compute-Runtime-Automation
parent 4cdd5671f7
commit 99a7b5a4fb
6 changed files with 17 additions and 12 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
* Copyright (C) 2018-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -19,7 +19,7 @@ struct MonitoredFence {
D3DKMT_HANDLE fenceHandle = 0;
D3DGPU_VIRTUAL_ADDRESS gpuAddress = 0;
volatile uint64_t *cpuAddress = nullptr;
volatile uint64_t currentFenceValue = 0;
uint64_t currentFenceValue = 0;
uint64_t lastSubmittedFence = 0;
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -13,7 +13,8 @@ namespace NEO {
struct MockMigrationSyncDataWithYield : public MigrationSyncData {
using MigrationSyncData::MigrationSyncData;
void yield() const override {
(*this->tagAddress)++;
auto newTag = *this->tagAddress + 1;
*this->tagAddress = newTag;
MigrationSyncData::yield();
}
};

View File

@@ -455,7 +455,7 @@ HWTEST_F(CommandStreamReceiverTest, givenGpuHangWhenWaititingForCompletionWithTi
csr.activePartitions = 1;
csr.gpuHangCheckPeriod = 0us;
volatile TagAddressType tasksCount[16] = {};
TagAddressType tasksCount[16] = {};
csr.tagAddress = tasksCount;
constexpr auto enableTimeout = false;
@@ -470,7 +470,7 @@ HWTEST_F(CommandStreamReceiverTest, givenNoGpuHangWhenWaititingForCompletionWith
auto driverModelMock = std::make_unique<MockDriverModel>();
driverModelMock->isGpuHangDetectedToReturn = false;
volatile TagAddressType tasksCount[16] = {};
TagAddressType tasksCount[16] = {};
driverModelMock->isGpuHangDetectedSideEffect = [&tasksCount] {
tasksCount[0]++;
};

View File

@@ -2351,7 +2351,8 @@ HWTEST_F(GraphicsAllocationDestroyTests, givenAllocationUsedOnlyByNonDefaultCsrW
memoryManager->checkGpuUsageAndDestroyGraphicsAllocations(graphicsAllocation);
EXPECT_NE(nullptr, nonDefaultCsr->getInternalAllocationStorage()->getDeferredAllocations().peekHead());
(*nonDefaultCsr->getTagAddress())++;
auto newTag = *nonDefaultCsr->getTagAddress() + 1;
(*nonDefaultCsr->getTagAddress()) = newTag;
// no need to call freeGraphicsAllocation
}
@@ -2374,7 +2375,8 @@ HWTEST_F(GraphicsAllocationDestroyTests, givenAllocationUsedOnlyByNonDefaultDevi
memoryManager->checkGpuUsageAndDestroyGraphicsAllocations(graphicsAllocation);
EXPECT_FALSE(nonDefaultCommandStreamReceiver.getInternalAllocationStorage()->getDeferredAllocations().peekIsEmpty());
EXPECT_TRUE(nonDefaultCommandStreamReceiver.getInternalAllocationStorage()->getTemporaryAllocations().peekIsEmpty());
(*nonDefaultCommandStreamReceiver.getTagAddress())++;
auto newTag = *nonDefaultCommandStreamReceiver.getTagAddress() + 1;
(*nonDefaultCommandStreamReceiver.getTagAddress()) = newTag;
// no need to call freeGraphicsAllocation
}