1. 28 1月, 2021 1 次提交
  2. 12 1月, 2021 1 次提交
    • 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
  3. 28 12月, 2020 3 次提交
  4. 30 11月, 2020 20 次提交
  5. 04 11月, 2020 1 次提交
    • A
      habanalabs: fix kernel pointer type · 82948e6e
      Arnd Bergmann 提交于
      All throughout the driver, normal kernel pointers are
      stored as 'u64' struct members, which is kind of silly
      and requires casting through a uintptr_t to void* every
      time they are used.
      
      There is one line that missed the intermediate uintptr_t
      case, which leads to a compiler warning:
      
      drivers/misc/habanalabs/common/command_buffer.c: In function 'hl_cb_mmap':
      drivers/misc/habanalabs/common/command_buffer.c:512:44: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        512 |  rc = hdev->asic_funcs->cb_mmap(hdev, vma, (void *) cb->kernel_address,
      
      Rather than adding one more cast, just fix the type and
      remove all the other casts.
      
      Fixes: 0db57535 ("habanalabs: make use of dma_mmap_coherent")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NOded Gabbay <ogabbay@kernel.org>
      82948e6e
  6. 22 9月, 2020 13 次提交
  7. 22 8月, 2020 1 次提交