summaryrefslogtreecommitdiffstats
path: root/include/uapi/misc
diff options
context:
space:
mode:
authorOded Gabbay <ogabbay@kernel.org>2021-04-02 01:43:18 +0300
committerOded Gabbay <ogabbay@kernel.org>2021-04-09 14:09:24 +0300
commit639781dcab8261f39c7028db4ed4fd0e760d69fa (patch)
treeadaa1b4c4e4eb50a89fe3a0de2c3ddda66795287 /include/uapi/misc
parente65448faf4cfeddd95a0e661aabf2fae1efc9831 (diff)
downloadlinux-stable-639781dcab8261f39c7028db4ed4fd0e760d69fa.tar.gz
linux-stable-639781dcab8261f39c7028db4ed4fd0e760d69fa.tar.bz2
linux-stable-639781dcab8261f39c7028db4ed4fd0e760d69fa.zip
habanalabs/gaudi: add debugfs to DMA from the device
When trying to debug program, the user often needs to dump large parts of the device's DRAM, which can reach to tens of GBs. Because reading from the device's internal memory through the PCI BAR is extremely slow, the debug can take hours. Instead, we can provide the user to copy data through one of the DMA engines. This will make the operation much faster. Currently, only GAUDI is supported. In GAUDI, we need to find a PCI DMA engine that is IDLE and set the DMA as secured to be able to bypass our MMU as we currently don't map the temporary buffer to the MMU. Example bash one-line to dump entire HBM to file (~2 minutes): for (( i=0x0; i < 0x800000000; i+=0x8000000 )); do \ printf '0x%x\n' $i | sudo tee /sys/kernel/debug/habanalabs/hl0/addr ; \ echo 0x8000000 | sudo tee /sys/kernel/debug/habanalabs/hl0/dma_size ; \ sudo cat /sys/kernel/debug/habanalabs/hl0/data_dma >> hbm.txt ; done Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'include/uapi/misc')
0 files changed, 0 insertions, 0 deletions