drm/nouveau: consume the return of large GSP message
[drm/drm-misc.git] / tools / verification / dot2 / dot2k_templates / main_per_task.c
blobffd92af87a86945f56f0c5138d71f1f498a45ae7
1 // SPDX-License-Identifier: GPL-2.0
2 #include <linux/ftrace.h>
3 #include <linux/tracepoint.h>
4 #include <linux/kernel.h>
5 #include <linux/module.h>
6 #include <linux/init.h>
7 #include <linux/rv.h>
8 #include <rv/instrumentation.h>
9 #include <rv/da_monitor.h>
11 #define MODULE_NAME "MODEL_NAME"
14 * XXX: include required tracepoint headers, e.g.,
15 * #include <linux/trace/events/sched.h>
17 #include <trace/events/rv.h>
20 * This is the self-generated part of the monitor. Generally, there is no need
21 * to touch this section.
23 #include "MODEL_NAME.h"
26 * Declare the deterministic automata monitor.
28 * The rv monitor reference is needed for the monitor declaration.
30 static struct rv_monitor rv_MODEL_NAME;
31 DECLARE_DA_MON_PER_TASK(MODEL_NAME, MIN_TYPE);
34 * This is the instrumentation part of the monitor.
36 * This is the section where manual work is required. Here the kernel events
37 * are translated into model's event.
40 TRACEPOINT_HANDLERS_SKEL
41 static int enable_MODEL_NAME(void)
43 int retval;
45 retval = da_monitor_init_MODEL_NAME();
46 if (retval)
47 return retval;
49 TRACEPOINT_ATTACH
51 return 0;
54 static void disable_MODEL_NAME(void)
56 rv_MODEL_NAME.enabled = 0;
58 TRACEPOINT_DETACH
60 da_monitor_destroy_MODEL_NAME();
64 * This is the monitor register section.
66 static struct rv_monitor rv_MODEL_NAME = {
67 .name = "MODEL_NAME",
68 .description = "auto-generated MODEL_NAME",
69 .enable = enable_MODEL_NAME,
70 .disable = disable_MODEL_NAME,
71 .reset = da_monitor_reset_all_MODEL_NAME,
72 .enabled = 0,
75 static int __init register_MODEL_NAME(void)
77 rv_register_monitor(&rv_MODEL_NAME);
78 return 0;
81 static void __exit unregister_MODEL_NAME(void)
83 rv_unregister_monitor(&rv_MODEL_NAME);
86 module_init(register_MODEL_NAME);
87 module_exit(unregister_MODEL_NAME);
89 MODULE_LICENSE("GPL");
90 MODULE_AUTHOR("dot2k: auto-generated");
91 MODULE_DESCRIPTION("MODEL_NAME");