Skip to content

Commit 802eb37

Browse files
Revert "Pass HardwareInfo to AubHelper::checkPTEAddress()"
Delete AubHelper::checkPTEAddress() This reverts commit aa587b3. Change-Id: I32b90ce7dddfd2347586b2c47b9114b45cced8ab
1 parent 64fbfb2 commit 802eb37

File tree

10 files changed

+19
-26
lines changed

10 files changed

+19
-26
lines changed

runtime/aub/aub_helper.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ uint64_t AubHelper::getPTEntryBits(uint64_t pdEntryBits) {
2424
return pdEntryBits;
2525
}
2626

27-
void AubHelper::checkPTEAddress(const HardwareInfo *pHwInfo, uint64_t address) {
28-
}
29-
3027
uint32_t AubHelper::getMemType(uint32_t addressSpace) {
3128
return 0;
3229
}

runtime/aub/aub_helper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class AubHelper : public NonCopyableOrMovableClass {
3131
static uint64_t getTotalMemBankSize();
3232
static int getMemTrace(uint64_t pdEntryBits);
3333
static uint64_t getPTEntryBits(uint64_t pdEntryBits);
34-
static void checkPTEAddress(const HardwareInfo *pHwInfo, uint64_t address);
3534
static uint32_t getMemType(uint32_t addressSpace);
3635
static uint64_t getMemBankSize(const HardwareInfo *pHwInfo);
3736
static uint32_t getDevicesCount(const HardwareInfo *pHwInfo);

runtime/aub_mem_dump/aub_mem_dump.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
namespace OCLRT {
2121
class AubHelper;
22-
struct HardwareInfo;
2322
}
2423

2524
namespace AubMemDump {
@@ -243,7 +242,7 @@ struct AubPageTableHelper32 : public AubPageTableHelper<Traits>, PageTableTraits
243242
static void createContext(typename Traits::Stream &stream, uint32_t context);
244243
static uint64_t reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
245244
size_t blockSize, uint64_t physAddress,
246-
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const OCLRT::HardwareInfo *hwInfo);
245+
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper);
247246

248247
static void fixupLRC(uint8_t *pLrc);
249248
};
@@ -259,7 +258,7 @@ struct AubPageTableHelper64 : public AubPageTableHelper<Traits>, PageTableTraits
259258
static void createContext(typename Traits::Stream &stream, uint32_t context);
260259
static uint64_t reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
261260
size_t blockSize, uint64_t physAddress,
262-
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const OCLRT::HardwareInfo *hwInfo);
261+
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper);
263262

264263
static void fixupLRC(uint8_t *pLrc);
265264
};
@@ -294,8 +293,7 @@ struct AubDump : public std::conditional<TraitsIn::addressingBits == 32, AubPage
294293
static uint64_t reserveAddressGGTT(Stream &stream, uint32_t addr, size_t size, uint64_t physStart, AubGTTData data);
295294
static uint64_t reserveAddressGGTT(Stream &stream, const void *memory, size_t size, uint64_t physStart, AubGTTData data);
296295
static void reserveAddressGGTTAndWriteMmeory(Stream &stream, uintptr_t gfxAddress, const void *memory, uint64_t physAddress,
297-
size_t size, size_t offset, uint64_t additionalBits,
298-
const OCLRT::AubHelper &aubHelper, const OCLRT::HardwareInfo *hwInfo);
296+
size_t size, size_t offset, uint64_t additionalBits, const OCLRT::AubHelper &aubHelper);
299297

300298
static void setGttEntry(MiGttEntry &entry, uint64_t address, AubGTTData data);
301299

runtime/aub_mem_dump/aub_mem_dump.inl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,12 @@ uint64_t AubDump<Traits>::reserveAddressGGTT(typename Traits::Stream &stream, co
117117
template <typename Traits>
118118
void AubDump<Traits>::reserveAddressGGTTAndWriteMmeory(typename Traits::Stream &stream, uintptr_t gfxAddress,
119119
const void *memory, uint64_t physAddress,
120-
size_t size, size_t offset, uint64_t additionalBits,
121-
const OCLRT::AubHelper &aubHelper, const HardwareInfo *hwInfo) {
120+
size_t size, size_t offset,
121+
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper) {
122122
auto vmAddr = (gfxAddress + offset) & ~(MemoryConstants::pageSize - 1);
123123
auto pAddr = physAddress & ~(MemoryConstants::pageSize - 1);
124124

125-
AubDump<Traits>::reserveAddressPPGTT(stream, vmAddr, MemoryConstants::pageSize, pAddr, additionalBits, aubHelper, hwInfo);
125+
AubDump<Traits>::reserveAddressPPGTT(stream, vmAddr, MemoryConstants::pageSize, pAddr, additionalBits, aubHelper);
126126

127127
int hint = OCLRT::AubHelper::getMemTrace(additionalBits);
128128

@@ -142,7 +142,7 @@ void AubDump<Traits>::setGttEntry(MiGttEntry &entry, uint64_t address, AubGTTDat
142142
template <typename Traits>
143143
uint64_t AubPageTableHelper32<Traits>::reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
144144
size_t blockSize, uint64_t physAddress,
145-
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const HardwareInfo *hwInfo) {
145+
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper) {
146146
auto startAddress = gfxAddress;
147147
auto endAddress = gfxAddress + blockSize - 1;
148148

@@ -206,7 +206,7 @@ uint64_t AubPageTableHelper32<Traits>::reserveAddressPPGTT(typename Traits::Stre
206206
template <typename Traits>
207207
uint64_t AubPageTableHelper64<Traits>::reserveAddressPPGTT(typename Traits::Stream &stream, uintptr_t gfxAddress,
208208
size_t blockSize, uint64_t physAddress,
209-
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper, const HardwareInfo *hwInfo) {
209+
uint64_t additionalBits, const OCLRT::AubHelper &aubHelper) {
210210
auto startAddress = gfxAddress;
211211
auto endAddress = gfxAddress + blockSize - 1;
212212

@@ -312,7 +312,6 @@ uint64_t AubPageTableHelper64<Traits>::reserveAddressPPGTT(typename Traits::Stre
312312

313313
stream.writePTE(startAddress, pte, addressSpace);
314314
startAddress += sizeof(pte);
315-
OCLRT::AubHelper::checkPTEAddress(hwInfo, startAddress);
316315

317316
physPage += 4096;
318317
currPTE++;

runtime/command_stream/aub_command_stream_receiver_hw.inl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(uint64_t batchBuff
421421
auto physBatchBuffer = ppgtt->map(static_cast<uintptr_t>(batchBufferGpuAddress), batchBufferSize, entryBits, memoryBank);
422422
AubHelperHw<GfxFamily> aubHelperHw(this->localMemoryEnabled);
423423
AUB::reserveAddressPPGTT(*stream, static_cast<uintptr_t>(batchBufferGpuAddress), batchBufferSize, physBatchBuffer,
424-
entryBits, aubHelperHw, &this->hwInfo);
424+
entryBits, aubHelperHw);
425425

426426
AUB::addMemoryWrite(
427427
*stream,
@@ -625,7 +625,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, voi
625625

626626
PageWalker walker = [&](uint64_t physAddress, size_t size, size_t offset, uint64_t entryBits) {
627627
AUB::reserveAddressGGTTAndWriteMmeory(*stream, static_cast<uintptr_t>(gpuAddress), cpuAddress, physAddress, size, offset, entryBits,
628-
aubHelperHw, &this->hwInfo);
628+
aubHelperHw);
629629
};
630630

631631
ppgtt->pageWalk(static_cast<uintptr_t>(gpuAddress), size, 0, entryBits, walker, memoryBank);
@@ -818,7 +818,7 @@ void AUBCommandStreamReceiverHw<GfxFamily>::addGUCStartMessage(uint64_t batchBuf
818818

819819
AUB::reserveAddressPPGTT(*stream, reinterpret_cast<uintptr_t>(buffer.get()), bufferSize, physBufferAddres,
820820
this->getPPGTTAdditionalBits(linearStream.getGraphicsAllocation()),
821-
aubHelperHw, &this->hwInfo);
821+
aubHelperHw);
822822

823823
AUB::addMemoryWrite(
824824
*stream,

runtime/command_stream/tbx_command_stream_receiver_hw.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::submitBatchBuffer(uint64_t batchBuff
234234

235235
AubHelperHw<GfxFamily> aubHelperHw(this->localMemoryEnabled);
236236
AUB::reserveAddressPPGTT(tbxStream, static_cast<uintptr_t>(batchBufferGpuAddress), batchBufferSize, physBatchBuffer,
237-
entryBits, aubHelperHw, &this->hwInfo);
237+
entryBits, aubHelperHw);
238238

239239
AUB::addMemoryWrite(
240240
tbxStream,
@@ -373,7 +373,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, voi
373373

374374
PageWalker walker = [&](uint64_t physAddress, size_t size, size_t offset, uint64_t entryBits) {
375375
AUB::reserveAddressGGTTAndWriteMmeory(tbxStream, static_cast<uintptr_t>(gpuAddress), cpuAddress, physAddress, size, offset, entryBits,
376-
aubHelperHw, &this->hwInfo);
376+
aubHelperHw);
377377
};
378378

379379
ppgtt->pageWalk(static_cast<uintptr_t>(gpuAddress), size, 0, entryBits, walker, memoryBank);

unit_tests/aub_tests/command_stream/aub_mem_dump_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ HWTEST_F(AubMemDumpTests, reserveMaxAddress) {
8686

8787
auto enableLocalMemory = HwHelper::get(hwInfo.pPlatform->eRenderCoreFamily).getEnableLocalMemory(hwInfo);
8888
OCLRT::AubHelperHw<FamilyType> aubHelperHw(enableLocalMemory);
89-
AUB::reserveAddressPPGTT(aubFile, gAddress, 4096, pAddress, 7, aubHelperHw, &hwInfo);
89+
AUB::reserveAddressPPGTT(aubFile, gAddress, 4096, pAddress, 7, aubHelperHw);
9090

9191
aubFile.fileHandle.close();
9292
}
@@ -108,7 +108,7 @@ HWTEST_F(AubMemDumpTests, DISABLED_writeVerifyOneBytePPGTT) {
108108
uint64_t physAddress = reinterpret_cast<uint64_t>(&byte) & 0xFFFFFFFF;
109109

110110
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
111-
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(byte), physAddress, 7, aubHelperHw, &pDevice->getHardwareInfo());
111+
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(byte), physAddress, 7, aubHelperHw);
112112
AUB::addMemoryWrite(aubFile, physAddress, &byte, sizeof(byte), AubMemDump::AddressSpaceValues::TraceNonlocal);
113113
aubFile.expectMemory(physAddress, &byte, sizeof(byte), AubMemDump::AddressSpaceValues::TraceNonlocal,
114114
AubMemDump::CmdServicesMemTraceMemoryCompare::CompareOperationValues::CompareEqual);
@@ -156,7 +156,7 @@ HWTEST_F(AubMemDumpTests, writeVerifySevenBytesPPGTT) {
156156
auto physAddress = reinterpret_cast<uint64_t>(bytes) & 0xFFFFFFFF;
157157

158158
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
159-
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(bytes), physAddress, 7, aubHelperHw, &pDevice->getHardwareInfo());
159+
AUB::reserveAddressPPGTT(aubFile, gAddress, sizeof(bytes), physAddress, 7, aubHelperHw);
160160
AUB::addMemoryWrite(aubFile, physAddress, bytes, sizeof(bytes), AubMemDump::AddressSpaceValues::TraceNonlocal);
161161
aubFile.expectMemory(physAddress, bytes, sizeof(bytes), AubMemDump::AddressSpaceValues::TraceNonlocal,
162162
AubMemDump::CmdServicesMemTraceMemoryCompare::CompareOperationValues::CompareEqual);

unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*

unit_tests/aub_tests/gen10/batch_buffer/aub_batch_buffer_tests_gen10.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void setupAUBWithBatchBuffer(const OCLRT::Device *pDevice, OCLRT::EngineType eng
5555

5656
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
5757

58-
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw, &pDevice->getHardwareInfo());
58+
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw);
5959
uint8_t batchBuffer[sizeBatchBuffer];
6060

6161
auto noop = MI_NOOP::sInit();

unit_tests/aub_tests/gen9/batch_buffer/aub_batch_buffer_tests.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void setupAUBWithBatchBuffer(const OCLRT::Device *pDevice, OCLRT::EngineType eng
5656

5757
OCLRT::AubHelperHw<FamilyType> aubHelperHw(false);
5858

59-
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw, &pDevice->getHardwareInfo());
59+
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw);
6060
uint8_t batchBuffer[sizeBatchBuffer];
6161

6262
auto noop = FamilyType::cmdInitNoop;

0 commit comments

Comments
 (0)