diff options
author | Pritesh Raithatha <praithatha@nvidia.com> | 2018-07-09 08:22:09 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-07-18 17:26:35 -0400 |
commit | 968b53a455465ba8a44296500eae36ec9c0b3ce1 (patch) | |
tree | 2c34f9c5cae65004e0cc70a94a9842005e8c05b7 | |
parent | 07a0ad3bc9497253f19b079ab57acfc088319643 (diff) |
iommu: dma-override: do not use it for kernel-4.14
Kernel-4.14 is not using this dma override function so skip it
for K4.14.
Bug 200427376
Change-Id: I10f76ade31cd278df7c309440c991fa140cf43e0
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1774425
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Tested-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/iommu/Makefile | 1 | ||||
-rw-r--r-- | drivers/iommu/dma-override.c | 7 | ||||
-rw-r--r-- | include/linux/dma-override.h | 21 |
3 files changed, 28 insertions, 1 deletions
diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index dc7a6afde..3815bd75e 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile | |||
@@ -3,6 +3,7 @@ ifdef CONFIG_ARCH_TEGRA_19x_SOC | |||
3 | ccflags-y += -Werror | 3 | ccflags-y += -Werror |
4 | 4 | ||
5 | ccflags-y += -I$(srctree)/drivers/iommu | 5 | ccflags-y += -I$(srctree)/drivers/iommu |
6 | |||
6 | obj-$(CONFIG_TEGRA_ARM_SMMU_T19x) += arm-smmu-t19x.o | 7 | obj-$(CONFIG_TEGRA_ARM_SMMU_T19x) += arm-smmu-t19x.o |
7 | obj-$(CONFIG_ARM_SMMU) += arm-smmu-regs.o | 8 | obj-$(CONFIG_ARM_SMMU) += arm-smmu-regs.o |
8 | obj-$(CONFIG_ARM_SMMU) += of_tegra-smmu.o | 9 | obj-$(CONFIG_ARM_SMMU) += of_tegra-smmu.o |
diff --git a/drivers/iommu/dma-override.c b/drivers/iommu/dma-override.c index a0da31c95..b1635938e 100644 --- a/drivers/iommu/dma-override.c +++ b/drivers/iommu/dma-override.c | |||
@@ -16,8 +16,12 @@ | |||
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/dma-override.h> | 19 | #include <linux/version.h> |
20 | |||
21 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
22 | |||
20 | #include <soc/tegra/chip-id.h> | 23 | #include <soc/tegra/chip-id.h> |
24 | #include <linux/dma-override.h> | ||
21 | 25 | ||
22 | static bool is_t19x; | 26 | static bool is_t19x; |
23 | 27 | ||
@@ -50,3 +54,4 @@ static int __init dma_override(void) | |||
50 | } | 54 | } |
51 | arch_initcall(dma_override); | 55 | arch_initcall(dma_override); |
52 | 56 | ||
57 | #endif | ||
diff --git a/include/linux/dma-override.h b/include/linux/dma-override.h index ccc4b1a6c..9d289d022 100644 --- a/include/linux/dma-override.h +++ b/include/linux/dma-override.h | |||
@@ -1,6 +1,26 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
1 | #ifndef _LINUX_DMA_MAPPING_OVERRIDE_H | 17 | #ifndef _LINUX_DMA_MAPPING_OVERRIDE_H |
2 | #define _LINUX_DMA_MAPPING_OVERRIDE_H | 18 | #define _LINUX_DMA_MAPPING_OVERRIDE_H |
3 | 19 | ||
20 | #include <linux/version.h> | ||
21 | |||
22 | #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 0) | ||
23 | |||
4 | #include <linux/mm.h> | 24 | #include <linux/mm.h> |
5 | #include <linux/dma-mapping.h> | 25 | #include <linux/dma-mapping.h> |
6 | #include <linux/iommu.h> | 26 | #include <linux/iommu.h> |
@@ -16,4 +36,5 @@ void dma_marshal_handle(enum dma_data_direction dir, dma_addr_t *handle); | |||
16 | void dma_unmarshal_handle(enum dma_data_direction dir, dma_addr_t *handle); | 36 | void dma_unmarshal_handle(enum dma_data_direction dir, dma_addr_t *handle); |
17 | 37 | ||
18 | #endif | 38 | #endif |
39 | #endif | ||
19 | 40 | ||