summaryrefslogtreecommitdiff
path: root/mali_kbase/mali_kbase_mem_linux.h
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2021-01-29 15:03:53 +0000
committerSidath Senanayake <sidaths@google.com>2021-01-29 15:03:53 +0000
commit9748305a584b9f1f7705303ce6e33a5e8b923e60 (patch)
treea73788e1d912a3202db3a99018002e0858e9a948 /mali_kbase/mali_kbase_mem_linux.h
parent201c8bfb4637601363b6e9283f3bdc510711a226 (diff)
downloadgpu-9748305a584b9f1f7705303ce6e33a5e8b923e60.tar.gz
Mali Valhall DDK r29p0 KMD
Provenance: afaca8da1 (collaborate/EAC/v_r29p0) VX504X08X-BU-00000-r29p0-01eac0 - Valhall Android DDK VX504X08X-BU-60000-r29p0-01eac0 - Valhall Android Document Bundle VX504X08X-DC-11001-r29p0-01eac0 - Valhall Android DDK Software Errata VX504X08X-SW-99006-r29p0-01eac0 - Valhall Android Renderscript AOSP parts Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: Ie0904c9223b7ec9311b848a52d3159ac2b07530e
Diffstat (limited to 'mali_kbase/mali_kbase_mem_linux.h')
-rw-r--r--mali_kbase/mali_kbase_mem_linux.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/mali_kbase/mali_kbase_mem_linux.h b/mali_kbase/mali_kbase_mem_linux.h
index c80d885..c96498f 100644
--- a/mali_kbase/mali_kbase_mem_linux.h
+++ b/mali_kbase/mali_kbase_mem_linux.h
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2010, 2012-2020 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT ARM Limited. All rights reserved.
*
* This program is free software and is provided to you under the terms of the
* GNU General Public License version 2 as published by the Free Software
@@ -18,10 +18,27 @@
*
* SPDX-License-Identifier: GPL-2.0
*
+ *//* SPDX-License-Identifier: GPL-2.0 */
+/*
+ *
+ * (C) COPYRIGHT 2010, 2012-2020 ARM Limited. All rights reserved.
+ *
+ * This program is free software and is provided to you under the terms of the
+ * GNU General Public License version 2 as published by the Free Software
+ * Foundation, and any use by you of this program is subject to the terms
+ * of such GNU license.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, you can access it online at
+ * http://www.gnu.org/licenses/gpl-2.0.html.
+ *
*/
-
-
/**
* @file mali_kbase_mem_linux.h
* Base kernel memory APIs, Linux implementation.
@@ -468,11 +485,11 @@ static inline vm_fault_t vmf_insert_pfn_prot(struct vm_area_struct *vma,
*/
static inline struct rw_semaphore *kbase_mem_get_process_mmap_lock(void)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0)
+#if KERNEL_VERSION(5, 8, 0) > LINUX_VERSION_CODE
return &current->mm->mmap_sem;
-#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0) */
+#else /* KERNEL_VERSION(5, 8, 0) > LINUX_VERSION_CODE */
return &current->mm->mmap_lock;
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) */
+#endif /* KERNEL_VERSION(5, 8, 0) > LINUX_VERSION_CODE */
}
#endif /* _KBASE_MEM_LINUX_H_ */