Commit 15017d64 authored by Daniel Krebs's avatar Daniel Krebs

gpu: get up to 1k DMA mappings and make it only a warning if it's more than one

parent bf1e5f87
Pipeline #74315 failed with stages
in 1 minute and 13 seconds
......@@ -271,16 +271,16 @@ bool Gpu::makeAccessibleToPCIeAndVA(const MemoryBlock& mem)
mm.getProcessAddressSpace(), mem.getAddrSpaceId());
// retrieve bus address
uint64_t addr[8];
ret = gdr_map_dma(pImpl->gdr, mh, 3, 0, 0, addr, 8);
static constexpr size_t maxDmaAddresses = 1 << 10;
uint64_t addr[maxDmaAddresses];
ret = gdr_map_dma(pImpl->gdr, mh, 3, 0, 0, addr, maxDmaAddresses);
for(int i = 0; i < ret; i++) {
logger->debug("DMA addr[{}]: {:#x}", i, addr[i]);
}
if(ret != 1) {
logger->error("Only one DMA address per block supported at the moment");
return false;
logger->warn("Only one DMA address per block supported at the moment, use first");
}
// mapping to access memory block from peer devices via PCIe
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment