Skip to content

Commit

Permalink
Max-out DMA segment size and boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
alewycky-tenstorrent committed Jul 31, 2024
1 parent 1511cca commit 8d63cf7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions enumerate.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ static int tenstorrent_pci_probe(struct pci_dev *dev, const struct pci_device_id
mutex_init(&tt_dev->chardev_mutex);

tt_dev->dma_capable = (dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(dma_address_bits ?: 32)) == 0);
// Max these to ensure the IOVA allocator will not split large pinned regions.
dma_set_max_seg_size(&dev->dev, UINT_MAX);
dma_set_seg_boundary(&dev->dev, ULONG_MAX);

pci_set_master(dev);
pci_enable_pcie_error_reporting(dev);

Expand Down

0 comments on commit 8d63cf7

Please sign in to comment.