xref: /linux/tools/verification/rvgen/tests/golden/ha_percpu/ha_percpu.h (revision 55ee4b931a7ffedc886175d265dd6e6d08fd4151)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Automatically generated C representation of ha_percpu automaton
4  * For further information about this format, see kernel documentation:
5  *   Documentation/trace/rv/deterministic_automata.rst
6  */
7 
8 #define MONITOR_NAME ha_percpu
9 
10 enum states_ha_percpu {
11 	S0_ha_percpu,
12 	S1_ha_percpu,
13 	S2_ha_percpu,
14 	S3_ha_percpu,
15 	state_max_ha_percpu,
16 };
17 
18 #define INVALID_STATE state_max_ha_percpu
19 
20 enum events_ha_percpu {
21 	event0_ha_percpu,
22 	event1_ha_percpu,
23 	event2_ha_percpu,
24 	event_max_ha_percpu,
25 };
26 
27 enum envs_ha_percpu {
28 	clk_ha_percpu,
29 	env1_ha_percpu,
30 	env2_ha_percpu,
31 	env_max_ha_percpu,
32 	env_max_stored_ha_percpu = env1_ha_percpu,
33 };
34 
35 _Static_assert(env_max_stored_ha_percpu <= MAX_HA_ENV_LEN, "Not enough slots");
36 #define HA_CLK_NS
37 
38 struct automaton_ha_percpu {
39 	char *state_names[state_max_ha_percpu];
40 	char *event_names[event_max_ha_percpu];
41 	char *env_names[env_max_ha_percpu];
42 	unsigned char function[state_max_ha_percpu][event_max_ha_percpu];
43 	unsigned char initial_state;
44 	bool final_states[state_max_ha_percpu];
45 };
46 
47 static const struct automaton_ha_percpu automaton_ha_percpu = {
48 	.state_names = {
49 		"S0",
50 		"S1",
51 		"S2",
52 		"S3",
53 	},
54 	.event_names = {
55 		"event0",
56 		"event1",
57 		"event2",
58 	},
59 	.env_names = {
60 		"clk",
61 		"env1",
62 		"env2",
63 	},
64 	.function = {
65 		{            S0_ha_percpu,            S1_ha_percpu,           INVALID_STATE },
66 		{            S0_ha_percpu,           INVALID_STATE,            S2_ha_percpu },
67 		{           INVALID_STATE,            S2_ha_percpu,            S3_ha_percpu },
68 		{            S0_ha_percpu,            S1_ha_percpu,           INVALID_STATE },
69 	},
70 	.initial_state = S0_ha_percpu,
71 	.final_states = { 1, 0, 0, 0 },
72 };
73