diff options
author | Omer Shpigelman <oshpigelman@habana.ai> | 2019-08-12 11:48:46 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2019-11-21 11:35:46 +0200 |
commit | 7f74d4d335f1bdcb51fca584d5ad065c4ff996ac (patch) | |
tree | f5ad2779ebe77b7a70ba694b840cd9d7838a596e /drivers/misc/habanalabs/habanalabs.h | |
parent | 5d1012576d20dd7cb70e00ea1b4c2af11a6c9156 (diff) | |
download | linux-stable-7f74d4d335f1bdcb51fca584d5ad065c4ff996ac.tar.gz linux-stable-7f74d4d335f1bdcb51fca584d5ad065c4ff996ac.tar.bz2 linux-stable-7f74d4d335f1bdcb51fca584d5ad065c4ff996ac.zip |
habanalabs: re-factor memory module code
Some of the functions in the memory module code were too long and/or
contained multiple operations that are not always done together. Re-factor
the code by dividing those functions to smaller functions which are more
readable and maintainable.
Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/habanalabs.h')
-rw-r--r-- | drivers/misc/habanalabs/habanalabs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/habanalabs/habanalabs.h b/drivers/misc/habanalabs/habanalabs.h index 2a5344cc1a60..78aef59e690b 100644 --- a/drivers/misc/habanalabs/habanalabs.h +++ b/drivers/misc/habanalabs/habanalabs.h @@ -692,7 +692,7 @@ struct hl_ctx_mgr { * @sgt: pointer to the scatter-gather table that holds the pages. * @dir: for DMA unmapping, the direction must be supplied, so save it. * @debugfs_list: node in debugfs list of command submissions. - * @addr: user-space virtual pointer to the start of the memory area. + * @addr: user-space virtual address of the start of the memory area. * @size: size of the memory area to pin & map. * @dma_mapped: true if the SG was mapped to DMA addresses, false otherwise. */ @@ -1527,7 +1527,7 @@ void hl_vm_fini(struct hl_device *hdev); int hl_pin_host_memory(struct hl_device *hdev, u64 addr, u64 size, struct hl_userptr *userptr); -int hl_unpin_host_memory(struct hl_device *hdev, struct hl_userptr *userptr); +void hl_unpin_host_memory(struct hl_device *hdev, struct hl_userptr *userptr); void hl_userptr_delete_list(struct hl_device *hdev, struct list_head *userptr_list); bool hl_userptr_is_pinned(struct hl_device *hdev, u64 addr, u32 size, |