summaryrefslogtreecommitdiff
path: root/dvalin/kernel/drivers/gpu/arm/midgard/mali_linux_trace.h
diff options
context:
space:
mode:
Diffstat (limited to 'dvalin/kernel/drivers/gpu/arm/midgard/mali_linux_trace.h')
-rw-r--r--dvalin/kernel/drivers/gpu/arm/midgard/mali_linux_trace.h47
1 files changed, 31 insertions, 16 deletions
diff --git a/dvalin/kernel/drivers/gpu/arm/midgard/mali_linux_trace.h b/dvalin/kernel/drivers/gpu/arm/midgard/mali_linux_trace.h
index f618755..2a243dd 100644
--- a/dvalin/kernel/drivers/gpu/arm/midgard/mali_linux_trace.h
+++ b/dvalin/kernel/drivers/gpu/arm/midgard/mali_linux_trace.h
@@ -1,11 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
*
- * (C) COPYRIGHT 2011-2016, 2018-2020 ARM Limited. All rights reserved.
+ * (C) COPYRIGHT 2011-2016, 2018-2021 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.
+ * 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
@@ -16,8 +17,6 @@
* along with this program; if not, you can access it online at
* http://www.gnu.org/licenses/gpl-2.0.html.
*
- * SPDX-License-Identifier: GPL-2.0
- *
*/
#undef TRACE_SYSTEM
@@ -31,7 +30,7 @@
#if defined(CONFIG_MALI_GATOR_SUPPORT)
#define MALI_JOB_SLOTS_EVENT_CHANGED
-/**
+/*
* mali_job_slots_event - Reports change of job slot status.
* @gpu_id: Kbase device id
* @event_id: ORed together bitfields representing a type of event,
@@ -181,6 +180,23 @@ TRACE_EVENT(mali_total_alloc_pages_change,
__print_symbolic(KBASE_MMU_FAULT_STATUS_ACCESS(status), \
KBASE_MMU_FAULT_ACCESS_SYMBOLIC_STRINGS)
+#if MALI_USE_CSF
+#define KBASE_MMU_FAULT_CODE_VALID(code) \
+ ((code >= 0xC0 && code <= 0xEB) && \
+ (!(code >= 0xC5 && code <= 0xC7)) && \
+ (!(code >= 0xCC && code <= 0xD8)) && \
+ (!(code >= 0xDC && code <= 0xDF)) && \
+ (!(code >= 0xE1 && code <= 0xE3)))
+#define KBASE_MMU_FAULT_CODE_SYMBOLIC_STRINGS _ENSURE_PARENTHESIS(\
+ {0xC0, "TRANSLATION_FAULT_" }, \
+ {0xC4, "TRANSLATION_FAULT_" }, \
+ {0xC8, "PERMISSION_FAULT_" }, \
+ {0xD0, "TRANSTAB_BUS_FAULT_" }, \
+ {0xD8, "ACCESS_FLAG_" }, \
+ {0xE0, "ADDRESS_SIZE_FAULT_IN" }, \
+ {0xE4, "ADDRESS_SIZE_FAULT_OUT" }, \
+ {0xE8, "MEMORY_ATTRIBUTES_FAULT_" })
+#else /* MALI_USE_CSF */
#define KBASE_MMU_FAULT_CODE_VALID(code) \
((code >= 0xC0 && code <= 0xEF) && \
(!(code >= 0xC5 && code <= 0xC6)) && \
@@ -197,6 +213,7 @@ TRACE_EVENT(mali_total_alloc_pages_change,
{0xE4, "ADDRESS_SIZE_FAULT_OUT" }, \
{0xE8, "MEMORY_ATTRIBUTES_FAULT_" }, \
{0xEC, "MEMORY_ATTRIBUTES_NONCACHEABLE_" })
+#endif /* MALI_USE_CSF */
#endif /* __TRACE_MALI_MMU_HELPERS */
/* trace_mali_mmu_page_fault_grow
@@ -288,7 +305,8 @@ DEFINE_EVENT_PRINT(mali_jit_softjob_template, mali_jit_free,
TP_printk("start=0x%llx va_pages=0x%zx backed_size=0x%zx",
__entry->start_addr, __entry->nr_pages, __entry->backed_pages));
-#if MALI_JIT_PRESSURE_LIMIT
+#if !MALI_USE_CSF
+#if MALI_JIT_PRESSURE_LIMIT_BASE
/* trace_mali_jit_report
*
* Tracepoint about the GPU data structure read to form a just-in-time memory
@@ -326,13 +344,11 @@ TRACE_EVENT(mali_jit_report,
),
__entry->read_val, __entry->used_pages)
);
-#endif /* MALI_JIT_PRESSURE_LIMIT */
+#endif /* MALI_JIT_PRESSURE_LIMIT_BASE */
+#endif /* !MALI_USE_CSF */
-#if (KERNEL_VERSION(4, 1, 0) <= LINUX_VERSION_CODE)
TRACE_DEFINE_ENUM(KBASE_JIT_REPORT_ON_ALLOC_OR_FREE);
-#endif
-
-#if MALI_JIT_PRESSURE_LIMIT
+#if MALI_JIT_PRESSURE_LIMIT_BASE
/* trace_mali_jit_report_pressure
*
* Tracepoint about change in physical memory pressure, due to the information
@@ -366,14 +382,13 @@ TRACE_EVENT(mali_jit_report_pressure,
{ KBASE_JIT_REPORT_ON_ALLOC_OR_FREE,
"HAPPENED_ON_ALLOC_OR_FREE" }))
);
-#endif /* MALI_JIT_PRESSURE_LIMIT */
+#endif /* MALI_JIT_PRESSURE_LIMIT_BASE */
#ifndef __TRACE_SYSGRAPH_ENUM
#define __TRACE_SYSGRAPH_ENUM
/* Enum of sysgraph message IDs */
enum sysgraph_msg {
SGR_ARRIVE,
- SGR_DEP_RES,
SGR_SUBMIT,
SGR_COMPLETE,
SGR_POST,
@@ -401,7 +416,7 @@ TRACE_EVENT(sysgraph,
__entry->message = message;
__entry->atom_id = atom_id;
),
- TP_printk("msg=%u proc_id=%u, param1=%d\n", __entry->message,
+ TP_printk("msg=%u proc_id=%u, param1=%d", __entry->message,
__entry->proc_id, __entry->atom_id)
);
@@ -427,7 +442,7 @@ TRACE_EVENT(sysgraph_gpu,
__entry->atom_id = atom_id;
__entry->js = js;
),
- TP_printk("msg=%u proc_id=%u, param1=%d, param2=%d\n",
+ TP_printk("msg=%u proc_id=%u, param1=%d, param2=%d",
__entry->message, __entry->proc_id,
__entry->atom_id, __entry->js)
);
@@ -516,7 +531,7 @@ TRACE_EVENT(mali_jit_trim,
TP_printk("freed_pages=%zu", __entry->freed_pages)
);
-#include "mali_kbase_debug_linux_ktrace.h"
+#include "debug/mali_kbase_debug_linux_ktrace.h"
#endif /* _TRACE_MALI_H */