hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/gpu/arm/bifrost/debug/backend/mali_kbase_debug_ktrace_jm.c
....@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
22 /*
33 *
4
- * (C) COPYRIGHT 2020-2021 ARM Limited. All rights reserved.
4
+ * (C) COPYRIGHT 2020-2022 ARM Limited. All rights reserved.
55 *
66 * This program is free software and is provided to you under the terms of the
77 * GNU General Public License version 2 as published by the Free Software
....@@ -71,14 +71,18 @@
7171 }
7272
7373 void kbasep_ktrace_add_jm(struct kbase_device *kbdev,
74
- enum kbase_ktrace_code code, struct kbase_context *kctx,
75
- struct kbase_jd_atom *katom, u64 gpu_addr,
76
- kbase_ktrace_flag_t flags, int refcount, int jobslot,
77
- u64 info_val)
74
+ enum kbase_ktrace_code code,
75
+ struct kbase_context *kctx,
76
+ const struct kbase_jd_atom *katom, u64 gpu_addr,
77
+ kbase_ktrace_flag_t flags, int refcount, int jobslot,
78
+ u64 info_val)
7879 {
7980 unsigned long irqflags;
8081 struct kbase_ktrace_msg *trace_msg;
8182
83
+ if (unlikely(!kbasep_ktrace_initialized(&kbdev->ktrace)))
84
+ return;
85
+
8286 spin_lock_irqsave(&kbdev->ktrace.lock, irqflags);
8387
8488 /* Reserve and update indices */