mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvadsp: os: Fix the argument of iommu_map() for Linux 6.3
There is additional argument added in iommu_map() from Linux6.3. Pass the proper argument from the drier who are using this APIs. Using conftest methods for differentiating whether additional argument is needed or not. Bug 4374520 Change-Id: I0844beb3338a2d5237832867547d05da91a41a5f Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026351 Reviewed-by: Viswanath L <viswanathl@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
cd4dce2c20
commit
c8262cbee1
@@ -2,6 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2014-2023, NVIDIA CORPORATION. All rights reserved.
|
||||||
*/
|
*/
|
||||||
|
#include <nvidia/conftest.h>
|
||||||
|
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
@@ -769,7 +770,11 @@ static void *nvadsp_dma_alloc_and_map_at(struct platform_device *pdev,
|
|||||||
|
|
||||||
/* Remap the contiguous physical addresses together */
|
/* Remap the contiguous physical addresses together */
|
||||||
ret = iommu_map(domain, iova + offset, pa, mp_size,
|
ret = iommu_map(domain, iova + offset, pa, mp_size,
|
||||||
|
#if defined(NV_IOMMU_MAP_HAS_GFP_ARG)
|
||||||
|
IOMMU_READ | IOMMU_WRITE, GFP_KERNEL);
|
||||||
|
#else
|
||||||
IOMMU_READ | IOMMU_WRITE);
|
IOMMU_READ | IOMMU_WRITE);
|
||||||
|
#endif
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "failed to map pa %llx va %llx size %lx\n",
|
dev_err(dev, "failed to map pa %llx va %llx size %lx\n",
|
||||||
pa, iova + offset, mp_size);
|
pa, iova + offset, mp_size);
|
||||||
|
|||||||
Reference in New Issue
Block a user