1. 30 11月, 2020 7 次提交
  2. 25 9月, 2020 1 次提交
  3. 22 9月, 2020 1 次提交
  4. 22 8月, 2020 1 次提交
  5. 29 7月, 2020 1 次提交
  6. 25 7月, 2020 2 次提交
  7. 01 6月, 2020 1 次提交
  8. 25 5月, 2020 1 次提交
  9. 24 3月, 2020 2 次提交
  10. 21 11月, 2019 6 次提交
  11. 12 8月, 2019 1 次提交
  12. 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
  13. 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
  14. 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
  15. 04 4月, 2019 1 次提交
  16. 01 4月, 2019 1 次提交
  17. 27 3月, 2019 1 次提交
  18. 07 3月, 2019 1 次提交
  19. 05 3月, 2019 1 次提交
  20. 28 2月, 2019 1 次提交
  21. 27 2月, 2019 2 次提交
    • O
      habanalabs: make functions static or declare them · 5e6e0239
      Oded Gabbay 提交于
      This patch fixes the below sparse warnings by either making the functions
      static or by adding a declaration in the relevant header file.
      
      In addition, the patch removes goya_mmap completely as it doesn't add any
      additional benefit.
      
      Fixes the following sparse warnings:
      
      drivers/misc/habanalabs/habanalabs_drv.c:24:1: warning: symbol 'hl_devs_idr' was not declared. Should it be static?
      drivers/misc/habanalabs/habanalabs_drv.c:25:1: warning: symbol 'hl_devs_idr_lock' was not declared. Should it be static?
      drivers/misc/habanalabs/memory.c:1451:5: warning: symbol 'hl_vm_ctx_init_with_ranges' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:396:5: warning: symbol 'goya_send_pci_access_msg' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:417:5: warning: symbol 'goya_pci_bars_map' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:557:6: warning: symbol 'goya_reset_link_through_bridge' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:774:5: warning: symbol 'goya_early_fini' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:857:6: warning: symbol 'goya_late_fini' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:971:5: warning: symbol 'goya_sw_fini' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:1233:5: warning: symbol 'goya_init_cpu_queues' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2914:5: warning: symbol 'goya_suspend' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2939:5: warning: symbol 'goya_resume' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2952:5: warning: symbol 'goya_mmap' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2957:5: warning: symbol 'goya_cb_mmap' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2973:6: warning: symbol 'goya_ring_doorbell' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3063:6: warning: symbol 'goya_flush_pq_write' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3068:6: warning: symbol 'goya_dma_alloc_coherent' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3074:6: warning: symbol 'goya_dma_free_coherent' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3080:6: warning: symbol 'goya_get_int_queue_base' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3138:5: warning: symbol 'goya_send_job_on_qman0' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3295:5: warning: symbol 'goya_test_queue' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3417:6: warning: symbol 'goya_dma_pool_zalloc' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3426:6: warning: symbol 'goya_dma_pool_free' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3432:6: warning: symbol 'goya_cpu_accessible_dma_pool_alloc' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3448:6: warning: symbol 'goya_cpu_accessible_dma_pool_free' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3458:5: warning: symbol 'goya_dma_map_sg' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3467:6: warning: symbol 'goya_dma_unmap_sg' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3473:5: warning: symbol 'goya_get_dma_desc_list_size' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4210:5: warning: symbol 'goya_parse_cb_no_mmu' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4261:5: warning: symbol 'goya_parse_cb_no_ext_quque' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4294:5: warning: symbol 'goya_cs_parser' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4307:6: warning: symbol 'goya_add_end_of_cb_packets' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4334:5: warning: symbol 'goya_context_switch' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4426:6: warning: symbol 'goya_restore_phase_topology' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4460:5: warning: symbol 'goya_debugfs_read32' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4510:5: warning: symbol 'goya_debugfs_write32' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4738:6: warning: symbol 'goya_handle_eqe' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4836:6: warning: symbol 'goya_get_events_stat' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:5075:5: warning: symbol 'goya_send_heartbeat' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:5253:5: warning: symbol 'goya_get_eeprom_data' was not declared. Should it be static?
      Reported-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5e6e0239
    • O
      habanalabs: allow memory allocations larger than 4GB · 230afe74
      Oded Gabbay 提交于
      This patch increase the size field in the uapi structure of the Memory
      IOCTL from 32-bit to 64-bit. This is to allow the user to allocate and/or
      map memory in chunks that are larger then 4GB.
      
      Goya's device memory (DRAM) can be up to 16GB, and for certain
      topologies, the user may want an allocation that is larger than 4GB.
      
      This change doesn't break current user-space because there was a "pad"
      field in the uapi structure right after the size field. Changing the size
      field to be 64-bit and removing the pad field maintains compatibility with
      current user-space.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      230afe74
  22. 22 2月, 2019 1 次提交
  23. 18 2月, 2019 3 次提交