mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 02:01:36 +03:00
platform: nvadsp: Fix dma_free_coherent() call
The parameters of dma_free_coherent() should be in order of: 1) Device pointer 2) Size 3) CPU virtual address 4) Device address However, the dma_free_coherent() here mixes with the size with the device address which will trigger kernel bugs. So this patch fixes the bug by exchanging those two. Bug 200444660 Change-Id: Ib0b7855be3868908a4fd59beb938f8bec9e6daee Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2098218 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Laxman Dewangan
parent
df7a7fb5ab
commit
5759b9d6d4
@@ -735,7 +735,7 @@ static void deallocate_memory_for_adsp_os(struct device *dev)
|
||||
struct iova_domain *iovad = &drv_data->iovad;
|
||||
void *va = nvadsp_da_to_va_mappings(priv.adsp_os_addr,
|
||||
priv.adsp_os_size);
|
||||
dma_free_coherent(dev, priv.adsp_os_addr, va, priv.adsp_os_size);
|
||||
dma_free_coherent(dev, priv.adsp_os_size, va, priv.adsp_os_addr);
|
||||
free_iova(iovad, iova_pfn(iovad, priv.adsp_os_addr));
|
||||
put_iova_domain(iovad);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user