diff options
author | Moti Haimovski <mhaimovski@habana.ai> | 2023-04-10 09:31:16 +0300 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2023-06-05 15:31:33 +0300 |
commit | f9b60242af3e2216ed03139bc2c14a02c54073ce (patch) | |
tree | ba64c7b92d25a3da69e8ab7fdffb8e72c3d304c0 /drivers/accel | |
parent | 574ee40f514453d09ea2c5f3882b3b369b5ba027 (diff) |
accel/habanalabs: fix bug in free scratchpad memory
This commit fixes a bug in Gaudi2 when freeing the scratchpad memory
in case software init fails.
Signed-off-by: Moti Haimovski <mhaimovski@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/accel')
-rw-r--r-- | drivers/accel/habanalabs/gaudi2/gaudi2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c index 6f05aa230376..acc304ebca82 100644 --- a/drivers/accel/habanalabs/gaudi2/gaudi2.c +++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c @@ -3630,8 +3630,8 @@ static int gaudi2_sw_init(struct hl_device *hdev) special_blocks_free: gaudi2_special_blocks_iterator_free(hdev); free_scratchpad_mem: - hl_asic_dma_pool_free(hdev, gaudi2->scratchpad_kernel_address, - gaudi2->scratchpad_bus_address); + hl_asic_dma_free_coherent(hdev, PAGE_SIZE, gaudi2->scratchpad_kernel_address, + gaudi2->scratchpad_bus_address); free_virt_msix_db_mem: hl_cpu_accessible_dma_pool_free(hdev, prop->pmmu.page_size, gaudi2->virt_msix_db_cpu_addr); free_cpu_accessible_dma_pool: |