1. 28 1月, 2021 30 次提交
  2. 22 1月, 2021 3 次提交
  3. 12 1月, 2021 3 次提交
    • O
      habanalabs: prevent soft lockup during unmap · 9488307a
      Oded Gabbay 提交于
      When using Deep learning framework such as tensorflow or pytorch, there
      are tens of thousands of host memory mappings. When the user frees
      all those mappings at the same time, the process of unmapping and
      unpinning them can take a long time, which may cause a soft lockup
      bug.
      
      To prevent this, we need to free the core to do other things during
      the unmapping process. For now, we chose to do it every 32K unmappings
      (each unmap is a single 4K page).
      Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
      9488307a
    • O
      habanalabs: fix reset process in case of failures · aa6df653
      Oded Gabbay 提交于
      There are some points in the reset process where if the code fails
      for some reason, and the system admin tries to initiate the reset
      process again we will get a kernel panic.
      
      This is because there aren't any protections in different fini
      functions that are called during the reset process.
      
      The protections that are added in this patch make sure that if the fini
      functions are called multiple times, without calling init functions
      between them, there won't be double release of already released
      resources.
      Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
      aa6df653
    • O
      habanalabs: fix dma_addr passed to dma_mmap_coherent · a9d4ef64
      Oded Gabbay 提交于
      When doing dma_alloc_coherent in the driver, we add a certain hard-coded
      offset to the DMA address before returning to the callee function. This
      offset is needed when our device use this DMA address to perform
      outbound transactions to the host.
      
      However, if we want to map the DMA'able memory to the user via
      dma_mmap_coherent(), we need to pass the original dma address, without
      this offset. Otherwise, we will get erronouos mapping.
      Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
      a9d4ef64
  4. 30 12月, 2020 1 次提交
  5. 28 12月, 2020 3 次提交