mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
nvidia-oot: use TEGRA_SYSTEM_TYPE_ACK as ack macro
Use config TEGRA_SYSTEM_TYPE_ACK to control kernel builds only base on the system type which also aliged to Makefile use. Bug 4223187 Change-Id: I276208d180d1b3459eccb80d8fdb818f4507d3df Signed-off-by: Jian-Min Liu <jianminl@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2966713 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
46f980b806
commit
719d3fa024
2
Makefile
2
Makefile
@@ -10,7 +10,7 @@ subdir-ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TEGRA_SYSTEM_TYPE_ACK),y)
|
||||
subdir-ccflags-y += -DNV_BUILD_KERNEL_ACK
|
||||
subdir-ccflags-y += -DCONFIG_TEGRA_SYSTEM_TYPE_ACK
|
||||
subdir-ccflags-y += -Wno-sometimes-uninitialized
|
||||
subdir-ccflags-y += -Wno-parentheses-equality
|
||||
subdir-ccflags-y += -Wno-enum-conversion
|
||||
|
||||
@@ -585,7 +585,7 @@ int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma)
|
||||
* to 0 as we want to map the whole buffer.
|
||||
*/
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) \
|
||||
|| (defined(NV_BUILD_KERNEL_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)))
|
||||
|| (defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)))
|
||||
vm_flags_clear(vma, VM_PFNMAP);
|
||||
#else
|
||||
vma->vm_flags &= ~VM_PFNMAP;
|
||||
@@ -604,7 +604,7 @@ int __tegra_gem_mmap(struct drm_gem_object *gem, struct vm_area_struct *vma)
|
||||
pgprot_t prot = vm_get_page_prot(vma->vm_flags);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) \
|
||||
|| (defined(NV_BUILD_KERNEL_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)))
|
||||
|| (defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)))
|
||||
vm_flags_set(vma, VM_MIXEDMAP);
|
||||
vm_flags_clear(vma, VM_PFNMAP);
|
||||
#else
|
||||
|
||||
@@ -343,7 +343,7 @@ endpoint_fops_mmap(struct file *filp, struct vm_area_struct *vma)
|
||||
}
|
||||
|
||||
vma->vm_pgoff = 0;
|
||||
#if defined(NV_BUILD_KERNEL_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
vm_flags_set(vma, VM_DONTCOPY);
|
||||
#else
|
||||
vma->vm_flags |= (VM_DONTCOPY); // fork() not supported.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "stream-extensions.h"
|
||||
#include "vmap.h"
|
||||
|
||||
#ifdef NV_BUILD_KERNEL_ACK
|
||||
#if defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
@@ -294,7 +294,7 @@ fops_mmap(struct file *filep, struct vm_area_struct *vma)
|
||||
memaddr = stream_obj->aper;
|
||||
|
||||
vma->vm_pgoff = 0;
|
||||
#if defined(NV_BUILD_KERNEL_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
#if defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
vm_flags_set(vma, VM_DONTCOPY);
|
||||
#else
|
||||
vma->vm_flags |= (VM_DONTCOPY);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define IPv6_PROTOCOL_OFFSET 20
|
||||
#endif
|
||||
|
||||
#ifdef NV_BUILD_KERNEL_ACK
|
||||
#if defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ atomic_t _malloc_size = ATOMIC_INIT(0);
|
||||
#endif
|
||||
#endif /* DBG_MEMORY_LEAK */
|
||||
|
||||
#ifdef NV_BUILD_KERNEL_ACK
|
||||
#if defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ int __nvmap_map(struct nvmap_handle *h, struct vm_area_struct *vma)
|
||||
priv->handle = h;
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)) \
|
||||
|| (defined(NV_BUILD_KERNEL_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)))
|
||||
|| (defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK) && (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0)))
|
||||
vm_flags_set(vma, VM_SHARED | VM_DONTEXPAND |
|
||||
VM_DONTDUMP | VM_DONTCOPY |
|
||||
(h->heap_pgalloc ? 0 : VM_PFNMAP));
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#endif /* !NVMAP_LOADABLE_MODULE */
|
||||
#endif
|
||||
|
||||
#ifdef NV_BUILD_KERNEL_ACK
|
||||
#if defined(CONFIG_TEGRA_SYSTEM_TYPE_ACK)
|
||||
MODULE_IMPORT_NS(VFS_internal_I_am_really_a_filesystem_and_am_NOT_a_driver);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user