1. 28 1月, 2021 4 次提交
  2. 12 1月, 2021 1 次提交
    • 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
  3. 30 11月, 2020 12 次提交
  4. 25 9月, 2020 1 次提交
  5. 22 9月, 2020 1 次提交
  6. 22 8月, 2020 1 次提交
  7. 29 7月, 2020 1 次提交
  8. 25 7月, 2020 2 次提交
  9. 01 6月, 2020 1 次提交
  10. 25 5月, 2020 1 次提交
  11. 24 3月, 2020 2 次提交
  12. 21 11月, 2019 6 次提交
  13. 12 8月, 2019 1 次提交
  14. 29 5月, 2019 2 次提交
    • O
      habanalabs: de-couple MMU and VM module initialization · 37d68ce5
      Oded Gabbay 提交于
      This patch initializes the MMU S/W structures before the VM S/W
      structures, instead of doing that as part of the VM S/W initialization.
      
      This is done because we need to configure some MMU mappings for the kernel
      context, before the VM is initialized. The VM initialization can't be
      moved earlier because it depends on the size of the DRAM, which is
      retrieved from the device CPU. Communication with the device CPU will
      require the MMU mappings to be configured and hence the de-coupling.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      37d68ce5
    • O
      habanalabs: fix bug in checking huge page optimization · d7241701
      Oded Gabbay 提交于
      This patch fix a bug in the mmu code that checks whether we can use huge
      page mappings for host pages.
      
      The code is supposed to enable huge page mappings only if ALL DMA
      addresses are aligned to 2MB AND the number of pages in each DMA chunk is
      a modulo of the number of pages in 2MB. However, the code ignored the
      first requirement for the first DMA chunk.
      
      This patch fix that issue by making sure the requirement of address
      alignment is validated against all DMA chunks.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      d7241701
  15. 01 5月, 2019 1 次提交
    • T
      habanalabs: Manipulate DMA addresses in ASIC functions · 94cb669c
      Tomer Tayar 提交于
      Routing device accesses to the host memory requires the usage of a base
      offset, which is canceled by the iATU just before leaving the device.
      The value of the base offset might be distinctive between different ASIC
      types.
      The manipulation of the addresses is currently used throughout the
      driver code, and one should be aware to it whenever providing a host
      memory address to the device.
      This patch removes this manipulation from the driver common code, and
      moves it to the ASIC specific functions that are responsible for
      host memory allocation/mapping.
      Signed-off-by: NTomer Tayar <ttayar@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      94cb669c
  16. 06 4月, 2019 1 次提交
    • O
      habanalabs: improve IOCTLs behavior when disabled or reset · 3f5398cf
      Oded Gabbay 提交于
      This patch makes some improvement in how IOCTLs behave when the device is
      disabled or under reset.
      
      The new code checks, at the start of every IOCTL, if the device is
      disabled or in reset. If so, it prints an appropriate kernel message and
      returns -EBUSY to user-space.
      
      In addition, the code modifies the location of where the
      hard_reset_pending flag is being set or cleared:
      
      1. It is now cleared immediately after the reset *tear-down* flow is
         finished but before the re-initialization flow begins.
      
      2. It is being set in the remove function of the device, to make the
         behavior the same with the hard-reset flow
      
      There are two exceptions to the disable or in reset check:
      
      1. The HL_INFO_DEVICE_STATUS opcode in the INFO IOCTL. This opcode allows
         the user to inquire about the status of the device, whether it is
         operational, in reset or malfunction (disabled). If the driver will
         block this IOCTL, the user won't be able to retrieve the status in
         case of malfunction or in reset.
      
      2. The WAIT_FOR_CS IOCTL. This IOCTL allows the user to inquire about the
         status of a CS. We want to allow the user to continue to do so, even if
         we started a soft-reset process because it will allow the user to get
         the correct error code for each CS he submitted.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      3f5398cf
  17. 04 4月, 2019 1 次提交
  18. 01 4月, 2019 1 次提交