summaryrefslogtreecommitdiff
path: root/mali_kbase/tests/kutf
diff options
context:
space:
mode:
authorSidath Senanayake <sidaths@google.com>2020-04-14 14:55:25 +0200
committerSidath Senanayake <sidaths@google.com>2020-04-14 14:55:25 +0200
commitb64f568f943e567534694cc993270adca96dcd06 (patch)
treeff175812d02016e7e630217ecf8de53d6ac2d6a2 /mali_kbase/tests/kutf
parentb2b1764ee0fe59773c1c8f621ad2955c35cd9d92 (diff)
downloadgpu-b64f568f943e567534694cc993270adca96dcd06.tar.gz
Mali Valhall DDK r24p0 KMD
Provenance: c5a37f014 (collaborate/EAC/v_r24p0) VX504X08X-BU-00000-r24p0-01rel0 - Android DDK VX504X08X-BU-60000-r24p0-01rel0 - Android Document Bundle Signed-off-by: Sidath Senanayake <sidaths@google.com> Change-Id: I1536474b6a18731cd377251c6dc947811ba0c787
Diffstat (limited to 'mali_kbase/tests/kutf')
-rw-r--r--mali_kbase/tests/kutf/build.bp21
-rw-r--r--mali_kbase/tests/kutf/kutf_suite.c18
2 files changed, 29 insertions, 10 deletions
diff --git a/mali_kbase/tests/kutf/build.bp b/mali_kbase/tests/kutf/build.bp
index f0c7a0c..32eab14 100644
--- a/mali_kbase/tests/kutf/build.bp
+++ b/mali_kbase/tests/kutf/build.bp
@@ -1,13 +1,16 @@
/*
- * Copyright:
- * ----------------------------------------------------------------------------
- * This confidential and proprietary software may be used only as authorized
- * by a licensing agreement from ARM Limited.
- * (C) COPYRIGHT 2018-2019 ARM Limited, ALL RIGHTS RESERVED
- * The entire notice above must be reproduced on all authorized copies and
- * copies may only be made to the extent permitted by a licensing agreement
- * from ARM Limited.
- * ----------------------------------------------------------------------------
+ *
+ * (C) COPYRIGHT 2018-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 licence.
+ *
+ * A copy of the licence is included with the program, and can also be obtained
+ * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
*/
bob_kernel_module {
diff --git a/mali_kbase/tests/kutf/kutf_suite.c b/mali_kbase/tests/kutf/kutf_suite.c
index 3307c0e..3f15669 100644
--- a/mali_kbase/tests/kutf/kutf_suite.c
+++ b/mali_kbase/tests/kutf/kutf_suite.c
@@ -1,6 +1,6 @@
/*
*
- * (C) COPYRIGHT 2014, 2017-2019 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2014, 2017-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
@@ -634,6 +634,17 @@ static void kutf_remove_test_variant(struct kutf_test_fixture *test_fix)
kfree(test_fix);
}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
+/* Adapting to the upstream debugfs_create_x32() change */
+static int ktufp_u32_get(void *data, u64 *val)
+{
+ *val = *(u32 *)data;
+ return 0;
+}
+
+DEFINE_DEBUGFS_ATTRIBUTE(kutfp_fops_x32_ro, ktufp_u32_get, NULL, "0x%08llx\n");
+#endif
+
void kutf_add_test_with_filters_and_data(
struct kutf_suite *suite,
unsigned int id,
@@ -668,8 +679,13 @@ void kutf_add_test_with_filters_and_data(
}
test_func->filters = filters;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
+ tmp = debugfs_create_file_unsafe("filters", S_IROTH, test_func->dir,
+ &test_func->filters, &kutfp_fops_x32_ro);
+#else
tmp = debugfs_create_x32("filters", S_IROTH, test_func->dir,
&test_func->filters);
+#endif
if (!tmp) {
pr_err("Failed to create debugfs file \"filters\" when adding test %s\n", name);
goto fail_file;