1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Automatically generated C representation of stall automaton 4 * For further information about this format, see kernel documentation: 5 * Documentation/trace/rv/deterministic_automata.rst 6 */ 7 8 #define MONITOR_NAME stall 9 10 enum states_stall { 11 dequeued_stall, 12 enqueued_stall, 13 running_stall, 14 state_max_stall, 15 }; 16 17 #define INVALID_STATE state_max_stall 18 19 enum events_stall { 20 sched_switch_in_stall, 21 sched_switch_preempt_stall, 22 sched_switch_wait_stall, 23 sched_wakeup_stall, 24 event_max_stall, 25 }; 26 27 enum envs_stall { 28 clk_stall, 29 env_max_stall, 30 env_max_stored_stall = env_max_stall, 31 }; 32 33 _Static_assert(env_max_stored_stall <= MAX_HA_ENV_LEN, "Not enough slots"); 34 35 struct automaton_stall { 36 char *state_names[state_max_stall]; 37 char *event_names[event_max_stall]; 38 char *env_names[env_max_stall]; 39 unsigned char function[state_max_stall][event_max_stall]; 40 unsigned char initial_state; 41 bool final_states[state_max_stall]; 42 }; 43 44 static const struct automaton_stall automaton_stall = { 45 .state_names = { 46 "dequeued", 47 "enqueued", 48 "running", 49 }, 50 .event_names = { 51 "sched_switch_in", 52 "sched_switch_preempt", 53 "sched_switch_wait", 54 "sched_wakeup", 55 }, 56 .env_names = { 57 "clk", 58 }, 59 .function = { 60 { 61 INVALID_STATE, 62 INVALID_STATE, 63 INVALID_STATE, 64 enqueued_stall, 65 }, 66 { 67 running_stall, 68 INVALID_STATE, 69 INVALID_STATE, 70 enqueued_stall, 71 }, 72 { 73 running_stall, 74 enqueued_stall, 75 dequeued_stall, 76 running_stall, 77 }, 78 }, 79 .initial_state = dequeued_stall, 80 .final_states = { 1, 0, 0 }, 81 }; 82