Line data Source code
1 :
2 : struct device;
3 :
4 : void *ldv_dev_get_drvdata(const struct device *dev);
5 : int ldv_dev_set_drvdata(struct device *dev, void *data);
6 :
7 : struct spi_master;
8 : struct device;
9 : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
10 :
11 : #include <linux/ldv/err.h>
12 :
13 : #include <linux/types.h>
14 : void *ldv_kzalloc(size_t size, gfp_t flags);
15 :
16 : struct clk;
17 :
18 : extern void ldv_clk_disable(struct clk *clk);
19 : extern int ldv_clk_enable(void);
20 :
21 : #include <linux/ldv/common.h>
22 : #include <linux/ldv/irq.h>
23 : #include <verifier/common.h>
24 : #include <verifier/nondet.h>
25 : #include <verifier/memory.h>
26 : #include <verifier/thread.h>
27 :
28 : #include <linux/device.h>
29 : #include <linux/platform_device.h>
30 : #include <linux/pm.h>
31 : #include <linux/rtc.h>
32 : #include <linux/timer.h>
33 :
34 :
35 : struct ldv_struct_platform_instance_2 {
36 : int signal_pending;
37 : };
38 1 :
39 : struct ldv_struct_timer_scenario_24 {
40 : struct timer_list *arg0;
41 : int signal_pending;
42 : };
43 :
44 : /* EMG Function declarations */
45 : void ldv_dispatch_default_deregister_2_26_4(void);
46 : void ldv_dispatch_default_deregister_3_26_5(void);
47 : void ldv_dispatch_default_deregister_4_26_6(void);
48 : void ldv_dispatch_default_deregister_5_26_7(void);
49 : void ldv_dispatch_default_deregister_7_26_8(void);
50 : void ldv_dispatch_default_register_2_26_13(void);
51 : void ldv_dispatch_default_register_3_26_12(void);
52 : void ldv_dispatch_default_register_4_26_11(void);
53 : void ldv_dispatch_default_register_5_26_10(void);
54 : void ldv_dispatch_default_register_7_26_9(void);
55 : void ldv_dispatch_insmod_deregister_27_2(void);
56 : void ldv_dispatch_insmod_register_27_3(void);
57 : void ldv_dispatch_instance_deregister_25_3(struct timer_list *);
58 : void ldv_dispatch_instance_register_25_4(struct timer_list *);
59 : void ldv_dispatch_pm_deregister_2_5(void);
60 : void ldv_dispatch_pm_register_2_6(void);
61 : void ldv_factory_scenario_25(void *);
62 : void ldv_insmod_26(void *);
63 : void ldv_insmod_mmc_exit_26_2(void (*)(void));
64 : int ldv_insmod_mmc_init_26_17(int (*)(void));
65 : void ldv_main_27(void *);
66 : void ldv_platform_instance_2(void *);
67 : int ldv_platform_instance_probe_2_15(int (*)(struct platform_device *), struct platform_device *);
68 : void ldv_platform_instance_release_2_3(int (*)(struct platform_device *), struct platform_device *);
69 : void ldv_pm_ops_scenario_1(void *);
70 : void ldv_pm_ops_scenario_complete_1_3(void (*)(struct device *), struct device *);
71 : void ldv_pm_ops_scenario_freeze_1_13(int (*)(struct device *), struct device *);
72 : void ldv_pm_ops_scenario_freeze_noirq_1_11(int (*)(struct device *), struct device *);
73 : void ldv_pm_ops_scenario_poweroff_1_8(int (*)(struct device *), struct device *);
74 : void ldv_pm_ops_scenario_poweroff_noirq_1_7(int (*)(struct device *), struct device *);
75 : void ldv_pm_ops_scenario_prepare_1_19(int (*)(struct device *), struct device *);
76 : void ldv_pm_ops_scenario_restore_1_4(int (*)(struct device *), struct device *);
77 : void ldv_pm_ops_scenario_restore_noirq_1_6(int (*)(struct device *), struct device *);
78 : extern void ldv_pm_ops_scenario_resume_1_14(int (*)(struct device *), struct device *);
79 : void ldv_pm_ops_scenario_resume_noirq_1_16(int (*)(struct device *), struct device *);
80 : void ldv_pm_ops_scenario_runtime_idle_1_24(int (*)(struct device *), struct device *);
81 : void ldv_pm_ops_scenario_runtime_resume_1_21(int (*)(struct device *), struct device *);
82 : void ldv_pm_ops_scenario_runtime_suspend_1_22(int (*)(struct device *), struct device *);
83 : void ldv_pm_ops_scenario_suspend_1_18(int (*)(struct device *), struct device *);
84 : void ldv_pm_ops_scenario_suspend_noirq_1_17(int (*)(struct device *), struct device *);
85 : void ldv_pm_ops_scenario_thaw_1_9(int (*)(struct device *), struct device *);
86 : void ldv_pm_ops_scenario_thaw_noirq_1_10(int (*)(struct device *), struct device *);
87 : void ldv_random_containerless_scenario_21(void *);
88 : void ldv_random_containerless_scenario_22(void *);
89 : void ldv_random_containerless_scenario_23(void *);
90 : void ldv_random_containerless_scenario_callback_21_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
91 : void ldv_random_containerless_scenario_callback_21_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
92 : extern void ldv_random_containerless_scenario_callback_22_10(void (*)(struct mmc_host *), struct mmc_host *);
93 : extern void ldv_random_containerless_scenario_callback_22_11(int (*)(struct mmc_host *), struct mmc_host *);
94 : extern void ldv_random_containerless_scenario_callback_22_12(int (*)(struct mmc_host *), struct mmc_host *);
95 : extern void ldv_random_containerless_scenario_callback_22_13(int (*)(struct mmc_host *), struct mmc_host *);
96 : extern void ldv_random_containerless_scenario_callback_22_4(int (*)(struct mmc_host *), struct mmc_host *);
97 : extern void ldv_random_containerless_scenario_callback_22_8(void (*)(struct mmc_host *), struct mmc_host *);
98 : extern void ldv_random_containerless_scenario_callback_22_9(void (*)(struct mmc_host *), struct mmc_host *);
99 : extern void ldv_random_containerless_scenario_callback_23_10(void (*)(struct mmc_host *), struct mmc_host *);
100 : extern void ldv_random_containerless_scenario_callback_23_11(int (*)(struct mmc_host *), struct mmc_host *);
101 : extern void ldv_random_containerless_scenario_callback_23_12(int (*)(struct mmc_host *), struct mmc_host *);
102 : extern void ldv_random_containerless_scenario_callback_23_13(int (*)(struct mmc_host *), struct mmc_host *);
103 : extern void ldv_random_containerless_scenario_callback_23_4(int (*)(struct mmc_host *), struct mmc_host *);
104 : extern void ldv_random_containerless_scenario_callback_23_8(void (*)(struct mmc_host *), struct mmc_host *);
105 : extern void ldv_random_containerless_scenario_callback_23_9(void (*)(struct mmc_host *), struct mmc_host *);
106 : extern void ldv_rtc_class_scenario_10(void *);
107 : extern void ldv_rtc_class_scenario_11(void *);
108 : extern void ldv_rtc_class_scenario_12(void *);
109 : extern void ldv_rtc_class_scenario_13(void *);
110 : extern void ldv_rtc_class_scenario_14(void *);
111 : extern void ldv_rtc_class_scenario_15(void *);
112 : extern void ldv_rtc_class_scenario_16(void *);
113 : extern void ldv_rtc_class_scenario_17(void *);
114 : extern void ldv_rtc_class_scenario_18(void *);
115 : extern void ldv_rtc_class_scenario_19(void *);
116 : extern void ldv_rtc_class_scenario_20(void *);
117 : extern void ldv_rtc_class_scenario_3(void *);
118 : extern void ldv_rtc_class_scenario_4(void *);
119 : extern void ldv_rtc_class_scenario_5(void *);
120 : extern void ldv_rtc_class_scenario_6(void *);
121 : extern void ldv_rtc_class_scenario_7(void *);
122 : extern void ldv_rtc_class_scenario_8(void *);
123 : extern void ldv_rtc_class_scenario_9(void *);
124 : int ldv_rtc_class_scenario_probe_10_11(int (*)(struct device *), struct device *);
125 : int ldv_rtc_class_scenario_probe_11_11(int (*)(struct device *), struct device *);
126 : int ldv_rtc_class_scenario_probe_12_11(int (*)(struct device *), struct device *);
127 : int ldv_rtc_class_scenario_probe_13_11(int (*)(struct device *), struct device *);
128 : int ldv_rtc_class_scenario_probe_14_11(int (*)(struct device *), struct device *);
129 : int ldv_rtc_class_scenario_probe_15_11(int (*)(struct device *), struct device *);
130 : int ldv_rtc_class_scenario_probe_16_11(int (*)(struct device *), struct device *);
131 : int ldv_rtc_class_scenario_probe_17_11(int (*)(struct device *), struct device *);
132 : int ldv_rtc_class_scenario_probe_18_11(int (*)(struct device *), struct device *);
133 : int ldv_rtc_class_scenario_probe_19_11(int (*)(struct device *), struct device *);
134 : int ldv_rtc_class_scenario_probe_20_11(int (*)(struct device *), struct device *);
135 : int ldv_rtc_class_scenario_probe_3_11(int (*)(struct device *), struct device *);
136 : int ldv_rtc_class_scenario_probe_4_11(int (*)(struct device *), struct device *);
137 : int ldv_rtc_class_scenario_probe_5_11(int (*)(struct device *), struct device *);
138 : int ldv_rtc_class_scenario_probe_6_11(int (*)(struct device *), struct device *);
139 : int ldv_rtc_class_scenario_probe_7_11(int (*)(struct device *), struct device *);
140 : int ldv_rtc_class_scenario_probe_8_11(int (*)(struct device *), struct device *);
141 : int ldv_rtc_class_scenario_probe_9_11(int (*)(struct device *), struct device *);
142 : void ldv_rtc_class_scenario_release_10_2(void (*)(struct device *), struct device *);
143 : void ldv_rtc_class_scenario_release_11_2(void (*)(struct device *), struct device *);
144 : void ldv_rtc_class_scenario_release_12_2(void (*)(struct device *), struct device *);
145 : void ldv_rtc_class_scenario_release_13_2(void (*)(struct device *), struct device *);
146 : void ldv_rtc_class_scenario_release_14_2(void (*)(struct device *), struct device *);
147 : void ldv_rtc_class_scenario_release_15_2(void (*)(struct device *), struct device *);
148 : void ldv_rtc_class_scenario_release_16_2(void (*)(struct device *), struct device *);
149 : void ldv_rtc_class_scenario_release_17_2(void (*)(struct device *), struct device *);
150 : void ldv_rtc_class_scenario_release_18_2(void (*)(struct device *), struct device *);
151 : void ldv_rtc_class_scenario_release_19_2(void (*)(struct device *), struct device *);
152 : void ldv_rtc_class_scenario_release_20_2(void (*)(struct device *), struct device *);
153 : void ldv_rtc_class_scenario_release_3_2(void (*)(struct device *), struct device *);
154 : void ldv_rtc_class_scenario_release_4_2(void (*)(struct device *), struct device *);
155 : void ldv_rtc_class_scenario_release_5_2(void (*)(struct device *), struct device *);
156 : void ldv_rtc_class_scenario_release_6_2(void (*)(struct device *), struct device *);
157 : void ldv_rtc_class_scenario_release_7_2(void (*)(struct device *), struct device *);
158 : void ldv_rtc_class_scenario_release_8_2(void (*)(struct device *), struct device *);
159 : void ldv_rtc_class_scenario_release_9_2(void (*)(struct device *), struct device *);
160 : void ldv_timer_scenario_24(void *);
161 : void ldv_timer_scenario_callback_24_2(void (*)(unsigned long), unsigned long);
162 : int main(void);
163 :
164 : /* EMG variable declarations */
165 1 : struct ldv_thread ldv_thread_1;
166 1 : struct ldv_thread ldv_thread_2;
167 1 : struct ldv_thread ldv_thread_21;
168 1 : struct ldv_thread ldv_thread_22;
169 1 : struct ldv_thread ldv_thread_23;
170 1 : struct ldv_thread ldv_thread_24;
171 1 : struct ldv_thread ldv_thread_25;
172 1 : struct ldv_thread ldv_thread_26;
173 1 : struct ldv_thread ldv_thread_27;
174 :
175 : /* EMG variable initialization */
176 :
177 : /* EMG function definitions */
178 : /* AUX_FUNC ldv_dispatch_default_deregister_2_26_4 */
179 : void ldv_dispatch_default_deregister_2_26_4() {
180 : struct ldv_struct_platform_instance_2 *cf_arg_2;
181 : /* Skip thread join call */
182 1 : return;
183 : }
184 :
185 : /* AUX_FUNC ldv_dispatch_default_deregister_3_26_5 */
186 : void ldv_dispatch_default_deregister_3_26_5() {
187 : struct ldv_struct_platform_instance_2 *cf_arg_3;
188 : struct ldv_struct_platform_instance_2 *cf_arg_4;
189 : struct ldv_struct_platform_instance_2 *cf_arg_5;
190 : struct ldv_struct_platform_instance_2 *cf_arg_6;
191 : struct ldv_struct_platform_instance_2 *cf_arg_7;
192 : struct ldv_struct_platform_instance_2 *cf_arg_8;
193 : struct ldv_struct_platform_instance_2 *cf_arg_9;
194 : struct ldv_struct_platform_instance_2 *cf_arg_10;
195 : struct ldv_struct_platform_instance_2 *cf_arg_11;
196 : struct ldv_struct_platform_instance_2 *cf_arg_12;
197 : struct ldv_struct_platform_instance_2 *cf_arg_13;
198 : struct ldv_struct_platform_instance_2 *cf_arg_14;
199 : struct ldv_struct_platform_instance_2 *cf_arg_15;
200 : struct ldv_struct_platform_instance_2 *cf_arg_16;
201 : struct ldv_struct_platform_instance_2 *cf_arg_17;
202 : struct ldv_struct_platform_instance_2 *cf_arg_18;
203 : struct ldv_struct_platform_instance_2 *cf_arg_19;
204 : struct ldv_struct_platform_instance_2 *cf_arg_20;
205 : /* Skip thread join call */
206 : /* Skip thread join call */
207 : /* Skip thread join call */
208 : /* Skip thread join call */
209 : /* Skip thread join call */
210 : /* Skip thread join call */
211 : /* Skip thread join call */
212 : /* Skip thread join call */
213 : /* Skip thread join call */
214 : /* Skip thread join call */
215 : /* Skip thread join call */
216 : /* Skip thread join call */
217 : /* Skip thread join call */
218 : /* Skip thread join call */
219 : /* Skip thread join call */
220 : /* Skip thread join call */
221 : /* Skip thread join call */
222 : /* Skip thread join call */
223 1 : return;
224 : }
225 :
226 : /* AUX_FUNC ldv_dispatch_default_deregister_4_26_6 */
227 : void ldv_dispatch_default_deregister_4_26_6() {
228 : struct ldv_struct_platform_instance_2 *cf_arg_21;
229 : /* Skip thread join call */
230 1 : return;
231 : }
232 :
233 : /* AUX_FUNC ldv_dispatch_default_deregister_5_26_7 */
234 : void ldv_dispatch_default_deregister_5_26_7() {
235 : struct ldv_struct_platform_instance_2 *cf_arg_22;
236 : struct ldv_struct_platform_instance_2 *cf_arg_23;
237 : /* Skip thread join call */
238 : /* Skip thread join call */
239 1 : return;
240 : }
241 :
242 : /* AUX_FUNC ldv_dispatch_default_deregister_7_26_8 */
243 : void ldv_dispatch_default_deregister_7_26_8() {
244 : struct ldv_struct_platform_instance_2 *cf_arg_25;
245 : /* Skip thread join call */
246 1 : return;
247 : }
248 :
249 : /* AUX_FUNC ldv_dispatch_default_register_2_26_13 */
250 : void ldv_dispatch_default_register_2_26_13() {
251 : struct ldv_struct_platform_instance_2 *cf_arg_2;
252 4 : cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
253 3 : ldv_platform_instance_2(cf_arg_2);
254 1 : return;
255 : }
256 :
257 : /* AUX_FUNC ldv_dispatch_default_register_3_26_12 */
258 : void ldv_dispatch_default_register_3_26_12() {
259 : struct ldv_struct_platform_instance_2 *cf_arg_3;
260 1 : struct ldv_struct_platform_instance_2 *cf_arg_4;
261 1 : struct ldv_struct_platform_instance_2 *cf_arg_5;
262 1 : struct ldv_struct_platform_instance_2 *cf_arg_6;
263 1 : struct ldv_struct_platform_instance_2 *cf_arg_7;
264 1 : struct ldv_struct_platform_instance_2 *cf_arg_8;
265 1 : struct ldv_struct_platform_instance_2 *cf_arg_9;
266 1 : struct ldv_struct_platform_instance_2 *cf_arg_10;
267 1 : struct ldv_struct_platform_instance_2 *cf_arg_11;
268 1 : struct ldv_struct_platform_instance_2 *cf_arg_12;
269 1 : struct ldv_struct_platform_instance_2 *cf_arg_13;
270 1 : struct ldv_struct_platform_instance_2 *cf_arg_14;
271 1 : struct ldv_struct_platform_instance_2 *cf_arg_15;
272 1 : struct ldv_struct_platform_instance_2 *cf_arg_16;
273 1 : struct ldv_struct_platform_instance_2 *cf_arg_17;
274 1 : struct ldv_struct_platform_instance_2 *cf_arg_18;
275 1 : struct ldv_struct_platform_instance_2 *cf_arg_19;
276 1 : struct ldv_struct_platform_instance_2 *cf_arg_20;
277 4 : cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
278 3 : ldv_rtc_class_scenario_3(cf_arg_3);
279 4 : cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
280 3 : ldv_rtc_class_scenario_4(cf_arg_4);
281 4 : cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
282 3 : ldv_rtc_class_scenario_5(cf_arg_5);
283 4 : cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
284 3 : ldv_rtc_class_scenario_6(cf_arg_6);
285 4 : cf_arg_7 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
286 3 : ldv_rtc_class_scenario_7(cf_arg_7);
287 4 : cf_arg_8 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
288 3 : ldv_rtc_class_scenario_8(cf_arg_8);
289 4 : cf_arg_9 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
290 3 : ldv_rtc_class_scenario_9(cf_arg_9);
291 4 : cf_arg_10 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
292 3 : ldv_rtc_class_scenario_10(cf_arg_10);
293 4 : cf_arg_11 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
294 3 : ldv_rtc_class_scenario_11(cf_arg_11);
295 4 : cf_arg_12 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
296 2 : ldv_rtc_class_scenario_12(cf_arg_12);
297 3 : cf_arg_13 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
298 2 : ldv_rtc_class_scenario_13(cf_arg_13);
299 3 : cf_arg_14 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
300 2 : ldv_rtc_class_scenario_14(cf_arg_14);
301 3 : cf_arg_15 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
302 2 : ldv_rtc_class_scenario_15(cf_arg_15);
303 3 : cf_arg_16 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
304 2 : ldv_rtc_class_scenario_16(cf_arg_16);
305 3 : cf_arg_17 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
306 2 : ldv_rtc_class_scenario_17(cf_arg_17);
307 3 : cf_arg_18 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
308 2 : ldv_rtc_class_scenario_18(cf_arg_18);
309 3 : cf_arg_19 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
310 2 : ldv_rtc_class_scenario_19(cf_arg_19);
311 3 : cf_arg_20 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
312 2 : ldv_rtc_class_scenario_20(cf_arg_20);
313 1 : return;
314 : }
315 :
316 : /* AUX_FUNC ldv_dispatch_default_register_4_26_11 */
317 : void ldv_dispatch_default_register_4_26_11() {
318 : struct ldv_struct_platform_instance_2 *cf_arg_21;
319 4 : cf_arg_21 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
320 3 : ldv_random_containerless_scenario_21(cf_arg_21);
321 1 : return;
322 : }
323 :
324 : /* AUX_FUNC ldv_dispatch_default_register_5_26_10 */
325 : void ldv_dispatch_default_register_5_26_10() {
326 : struct ldv_struct_platform_instance_2 *cf_arg_22;
327 1 : struct ldv_struct_platform_instance_2 *cf_arg_23;
328 4 : cf_arg_22 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
329 3 : ldv_random_containerless_scenario_22(cf_arg_22);
330 4 : cf_arg_23 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
331 2 : ldv_random_containerless_scenario_23(cf_arg_23);
332 1 : return;
333 : }
334 :
335 : /* AUX_FUNC ldv_dispatch_default_register_7_26_9 */
336 : void ldv_dispatch_default_register_7_26_9() {
337 : struct ldv_struct_platform_instance_2 *cf_arg_25;
338 4 : cf_arg_25 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
339 3 : ldv_factory_scenario_25(cf_arg_25);
340 1 : return;
341 : }
342 :
343 : /* AUX_FUNC ldv_dispatch_insmod_deregister_27_2 */
344 : void ldv_dispatch_insmod_deregister_27_2() {
345 : struct ldv_struct_platform_instance_2 *cf_arg_26;
346 : /* Skip thread join call */
347 1 : return;
348 : }
349 :
350 : /* AUX_FUNC ldv_dispatch_insmod_register_27_3 */
351 : void ldv_dispatch_insmod_register_27_3() {
352 : struct ldv_struct_platform_instance_2 *cf_arg_26;
353 4 : cf_arg_26 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
354 4 : ldv_insmod_26(cf_arg_26);
355 1 : return;
356 : }
357 :
358 : /* AUX_FUNC ldv_dispatch_instance_deregister_25_3 */
359 : void ldv_dispatch_instance_deregister_25_3(struct timer_list *arg0) {
360 : struct ldv_struct_timer_scenario_24 *cf_arg_24;
361 : /* Skip thread join call */
362 1 : return;
363 : }
364 :
365 : /* AUX_FUNC ldv_dispatch_instance_register_25_4 */
366 : void ldv_dispatch_instance_register_25_4(struct timer_list *arg0) {
367 : struct ldv_struct_timer_scenario_24 *cf_arg_24;
368 4 : cf_arg_24 = ldv_xmalloc(sizeof(struct ldv_struct_timer_scenario_24));
369 2 : cf_arg_24->arg0 = arg0;
370 4 : ldv_timer_scenario_24(cf_arg_24);
371 1 : return;
372 : }
373 :
374 : /* AUX_FUNC ldv_dispatch_pm_deregister_2_5 */
375 : void ldv_dispatch_pm_deregister_2_5() {
376 : struct ldv_struct_platform_instance_2 *cf_arg_1;
377 : /* Skip thread join call */
378 1 : return;
379 : }
380 :
381 : /* AUX_FUNC ldv_dispatch_pm_register_2_6 */
382 : void ldv_dispatch_pm_register_2_6() {
383 : struct ldv_struct_platform_instance_2 *cf_arg_1;
384 4 : cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
385 3 : ldv_pm_ops_scenario_1(cf_arg_1);
386 1 : return;
387 : }
388 :
389 : /* AUX_FUNC ldv_factory_scenario_25 */
390 : void ldv_factory_scenario_25(void *arg0) {
391 : /* LDV {"thread": 25, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'factory_scenario(timer)'", "function": "ldv_factory_scenario_25"} */
392 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
393 1 : struct timer_list *ldv_25_container_timer_list;
394 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
395 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "RECEIVE_BEGIN", "comment": "Proceed to TIMER callbacks invocations scenarios."} */
396 2 : ldv_free(arg0);
397 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "RECEIVE_END"} */
398 :
399 : /* LDV {"action": "DEFAULT_ALLOC_7", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
400 3 : ldv_25_container_timer_list = ldv_xmalloc_unknown_size(0);
401 : /* LDV {"action": "DEFAULT_ALLOC_7", "type": "CONDITION_END"} */
402 :
403 : /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Initiate scenario for TIMER callbacks invocations"} */
404 2 : ldv_dispatch_instance_register_25_4(ldv_25_container_timer_list);
405 : /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_END"} */
406 :
407 : /* LDV {"action": "INSTANCE_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Finish scenario for TIMER callbacks invocations"} */
408 2 : ldv_dispatch_instance_deregister_25_3(ldv_25_container_timer_list);
409 : /* LDV {"action": "INSTANCE_DEREGISTER", "type": "DISPATCH_END"} */
410 :
411 : /* LDV {"action": "DEFAULT_FREE_7", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
412 2 : ldv_free(ldv_25_container_timer_list);
413 : /* LDV {"action": "DEFAULT_FREE_7", "type": "CONDITION_END"} */
414 :
415 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "RECEIVE_BEGIN", "comment": "Finish TIMER callbacks invocations scenarios."} */
416 : /* Skip a non-replicative signal receiving */
417 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "RECEIVE_END"} */
418 :
419 : /* Exit function at a terminal state */
420 1 : return;
421 : /* End of the process */
422 : return;
423 : /* LDV {"comment": "End of control function based on process 'factory_scenario(timer)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_factory_scenario_25"} */
424 : }
425 :
426 : /* AUX_FUNC ldv_insmod_26 */
427 : void ldv_insmod_26(void *arg0) {
428 : /* LDV {"thread": 26, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_26"} */
429 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
430 1 : void (*ldv_26_mmc_exit_default)(void);
431 1 : int (*ldv_26_mmc_init_default)(void);
432 1 : int ldv_26_ret_default;
433 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
434 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
435 2 : ldv_free(arg0);
436 : /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
437 :
438 : /* LDV {"action": "MMC_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'mmc_init' function. Invoke callback mmc_init from ARTIFICIAL."} */
439 : /* LDV {"type": "CALLBACK", "call": "ldv_26_ret_default = (mmc_init)();", "comment": "mmc_init"} */
440 2 : ldv_26_ret_default = ldv_insmod_mmc_init_26_17(ldv_26_mmc_init_default);
441 : /* Callback post-call */
442 2 : ldv_26_ret_default = ldv_post_init(ldv_26_ret_default);
443 : /* LDV {"action": "MMC_INIT", "type": "CALL_END"} */
444 :
445 4 : if (ldv_undef_int()) {
446 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
447 2 : ldv_assume(ldv_26_ret_default != 0);
448 : /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
449 :
450 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
451 : /* Skip a non-replicative signal receiving */
452 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
453 :
454 : /* Exit function at a terminal state */
455 1 : return;
456 : }
457 : else {
458 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
459 2 : ldv_assume(ldv_26_ret_default == 0);
460 : /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
461 :
462 4 : if (ldv_undef_int()) {
463 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Register 'PM' callbacks with unknown registration function."} */
464 2 : ldv_dispatch_default_register_2_26_13();
465 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "DISPATCH_END"} */
466 :
467 : /* LDV {"action": "DEFAULT_REGISTER_3", "type": "DISPATCH_BEGIN", "comment": "Register 'RTC' callbacks with unknown registration function."} */
468 2 : ldv_dispatch_default_register_3_26_12();
469 : /* LDV {"action": "DEFAULT_REGISTER_3", "type": "DISPATCH_END"} */
470 :
471 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_KERNEL_PARAM' callbacks with unknown registration function."} */
472 2 : ldv_dispatch_default_register_4_26_11();
473 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "DISPATCH_END"} */
474 :
475 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_MMC_BUS_OPS' callbacks with unknown registration function."} */
476 2 : ldv_dispatch_default_register_5_26_10();
477 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "DISPATCH_END"} */
478 :
479 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Register 'TIMER' callbacks with unknown registration function."} */
480 2 : ldv_dispatch_default_register_7_26_9();
481 : /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_END"} */
482 :
483 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Deregister 'TIMER' callbacks with unknown deregistration function."} */
484 2 : ldv_dispatch_default_deregister_7_26_8();
485 : /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_END"} */
486 :
487 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_MMC_BUS_OPS' callbacks with unknown deregistration function."} */
488 2 : ldv_dispatch_default_deregister_5_26_7();
489 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "DISPATCH_END"} */
490 :
491 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_KERNEL_PARAM' callbacks with unknown deregistration function."} */
492 2 : ldv_dispatch_default_deregister_4_26_6();
493 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "DISPATCH_END"} */
494 :
495 : /* LDV {"action": "DEFAULT_DEREGISTER_3", "type": "DISPATCH_BEGIN", "comment": "Deregister 'RTC' callbacks with unknown deregistration function."} */
496 2 : ldv_dispatch_default_deregister_3_26_5();
497 : /* LDV {"action": "DEFAULT_DEREGISTER_3", "type": "DISPATCH_END"} */
498 :
499 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_BEGIN", "comment": "Deregister 'PM' callbacks with unknown deregistration function."} */
500 2 : ldv_dispatch_default_deregister_2_26_4();
501 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "DISPATCH_END"} */
502 :
503 : }
504 : else {
505 : /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
506 : /* LDV {"action": "NONE", "type": "CONDITION_END"} */
507 :
508 : }
509 : /* LDV {"action": "MMC_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'mmc_exit' function. Invoke callback mmc_exit from ARTIFICIAL."} */
510 : /* LDV {"type": "CALLBACK", "call": "(mmc_exit)();", "comment": "mmc_exit"} */
511 4 : ldv_insmod_mmc_exit_26_2(ldv_26_mmc_exit_default);
512 : /* LDV {"action": "MMC_EXIT", "type": "CALL_END"} */
513 :
514 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
515 : /* Skip a non-replicative signal receiving */
516 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
517 :
518 : /* Exit function at a terminal state */
519 1 : return;
520 : }
521 : /* End of the process */
522 : return;
523 : /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_26"} */
524 : }
525 :
526 : /* AUX_FUNC_CALLBACK ldv_insmod_mmc_exit_26_2 */
527 : void ldv_insmod_mmc_exit_26_2(void (*arg0)(void)) {
528 4 : (mmc_exit)();
529 2 : }
530 :
531 : /* AUX_FUNC_CALLBACK ldv_insmod_mmc_init_26_17 */
532 : int ldv_insmod_mmc_init_26_17(int (*arg0)(void)) {
533 6 : return (mmc_init)();
534 1 : }
535 :
536 : /* AUX_FUNC ldv_main_27 */
537 : void ldv_main_27(void *arg0) {
538 : /* LDV {"thread": 27, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_27"} */
539 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
540 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
541 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
542 1 : ldv_initialize();
543 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
544 :
545 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
546 2 : ldv_dispatch_insmod_register_27_3();
547 : /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
548 :
549 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
550 2 : ldv_dispatch_insmod_deregister_27_2();
551 : /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
552 :
553 : /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
554 1 : ldv_check_final_state();
555 1 : ldv_stop();
556 : /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
557 :
558 : /* Exit function at a terminal state */
559 0 : return;
560 : /* End of the process */
561 : return;
562 : /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_27"} */
563 : }
564 :
565 : /* AUX_FUNC ldv_platform_instance_2 */
566 : void ldv_platform_instance_2(void *arg0) {
567 : /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'platform_instance(pm)'", "function": "ldv_platform_instance_2"} */
568 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
569 1 : struct platform_driver *ldv_2_container_platform_driver;
570 1 : struct platform_device *ldv_2_ldv_param_15_0_default;
571 1 : struct platform_device *ldv_2_ldv_param_3_0_default;
572 1 : int ldv_2_probed_default;
573 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
574 1 : /* Initialize automaton variables */
575 2 : ldv_2_probed_default = 1;
576 1 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Register a driver callbacks for platform-level device."} */
577 3 : ldv_free(arg0);
578 : /* LDV {"action": "DEFAULT_REGISTER_2", "type": "RECEIVE_END"} */
579 :
580 : /* LDV {"action": "DEFAULT_ALLOC_2", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
581 3 : ldv_2_container_platform_driver = ldv_xmalloc_unknown_size(0);
582 : /* LDV {"action": "DEFAULT_ALLOC_2", "type": "CONDITION_END"} */
583 :
584 : /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for 'platform_device' structure."} */
585 : /* LDV {"action": "INIT", "type": "CONDITION_END"} */
586 :
587 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
588 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
589 :
590 : /* Jump to a subprocess 'main' initial state */
591 1 : goto ldv_main_2;
592 : /* End of the process */
593 : return;
594 1 :
595 : /* Sbprocess main */
596 : ldv_main_2:
597 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
598 :
599 4 : if (ldv_undef_int()) {
600 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
601 3 : ldv_2_ldv_param_15_0_default = ldv_xmalloc_unknown_size(0);
602 : /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
603 :
604 : /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Check that the device in the system and do driver initializations. Invoke callback probe from PM."} */
605 : /* Callback pre-call */
606 1 : ldv_pre_probe();
607 3 : if (ldv_2_container_platform_driver->probe) {
608 : /* LDV {"type": "CALLBACK", "call": "ldv_2_probed_default = (ldv_2_container_platform_driver->probe)(ldv_2_ldv_param_15_0_default);", "comment": "probe"} */
609 2 : ldv_2_probed_default = ldv_platform_instance_probe_2_15(ldv_2_container_platform_driver->probe, ldv_2_ldv_param_15_0_default);
610 : }
611 : /* Callback post-call */
612 4 : ldv_2_probed_default = ldv_post_probe(ldv_2_probed_default);
613 : /* LDV {"action": "PROBE", "type": "CALL_END"} */
614 :
615 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
616 2 : ldv_free(ldv_2_ldv_param_15_0_default);
617 : /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
618 :
619 4 : if (ldv_undef_int()) {
620 : /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Platform device is probed successfully now."} */
621 2 : ldv_assume(ldv_2_probed_default == 0);
622 : /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_END"} */
623 :
624 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
625 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
626 :
627 : /* Jump to a subprocess 'call' initial state */
628 1 : goto ldv_call_2;
629 : }
630 : else {
631 : /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Failed to probe the device."} */
632 2 : ldv_assume(ldv_2_probed_default != 0);
633 : /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_END"} */
634 :
635 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
636 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
637 :
638 : /* Jump to a subprocess 'main' initial state */
639 1 : goto ldv_main_2;
640 : }
641 : }
642 : else {
643 : /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for 'platform_device' structure."} */
644 : /* LDV {"action": "FREE", "type": "CONDITION_END"} */
645 :
646 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
647 2 : ldv_free(ldv_2_container_platform_driver);
648 : /* LDV {"action": "DEFAULT_FREE_2", "type": "CONDITION_END"} */
649 :
650 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_BEGIN", "comment": "Finish PM callbacks invocations scenario."} */
651 : /* Skip a non-replicative signal receiving */
652 : /* LDV {"action": "DEFAULT_DEREGISTER_2", "type": "RECEIVE_END"} */
653 :
654 : /* Exit function at a terminal state */
655 1 : return;
656 : }
657 : /* End of the subprocess 'main' */
658 : return;
659 1 :
660 : /* Sbprocess call */
661 : ldv_call_2:
662 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
663 :
664 2 : switch (ldv_undef_int()) {
665 3 : case 1: {
666 : /* LDV {"action": "PRE_CALL_3", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
667 3 : ldv_2_ldv_param_3_0_default = ldv_xmalloc_unknown_size(0);
668 : /* LDV {"action": "PRE_CALL_3", "type": "CONDITION_END"} */
669 :
670 : /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Remove device from the system. Invoke callback release from PM."} */
671 3 : if (ldv_2_container_platform_driver->remove) {
672 : /* LDV {"type": "CALLBACK", "call": "(ldv_2_container_platform_driver->remove)(ldv_2_ldv_param_3_0_default);", "comment": "release"} */
673 2 : ldv_platform_instance_release_2_3(ldv_2_container_platform_driver->remove, ldv_2_ldv_param_3_0_default);
674 : }
675 : /* LDV {"action": "RELEASE", "type": "CALL_END"} */
676 :
677 : /* LDV {"action": "POST_CALL_3", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
678 4 : ldv_free(ldv_2_ldv_param_3_0_default);
679 : /* LDV {"action": "POST_CALL_3", "type": "CONDITION_END"} */
680 :
681 : /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_BEGIN", "comment": "Platform device is released now."} */
682 1 : ldv_2_probed_default = 1;
683 : /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_END"} */
684 :
685 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
686 : /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
687 :
688 : /* Jump to a subprocess 'main' initial state */
689 1 : goto ldv_main_2;
690 1 : break;
691 : }
692 3 : case 2: {
693 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "comment": "Call callback 'callback' of a process 'platform_instance' of an interface category 'pm'"} */
694 : /* Skip callback without implementations */
695 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
696 :
697 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
698 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
699 :
700 : /* Jump to a subprocess 'call' initial state */
701 1 : goto ldv_call_2;
702 1 : break;
703 : }
704 3 : case 3: {
705 : /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Proceed to a power management scenario."} */
706 2 : ldv_dispatch_pm_register_2_6();
707 : /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_END"} */
708 :
709 : /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Finish the power management scenario."} */
710 2 : ldv_dispatch_pm_deregister_2_5();
711 : /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_END"} */
712 :
713 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
714 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
715 :
716 : /* Jump to a subprocess 'call' initial state */
717 1 : goto ldv_call_2;
718 : /* Jump to a subprocess 'call' initial state */
719 : goto ldv_call_2;
720 1 : break;
721 : }
722 2 : default: ldv_stop();
723 1 : }
724 0 : /* End of the subprocess 'call' */
725 0 : return;
726 : /* LDV {"comment": "End of control function based on process 'platform_instance(pm)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_platform_instance_2"} */
727 : }
728 :
729 : /* AUX_FUNC_CALLBACK ldv_platform_instance_probe_2_15 */
730 : int ldv_platform_instance_probe_2_15(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
731 3 : return (*arg0)(arg1);
732 1 : }
733 :
734 : /* AUX_FUNC_CALLBACK ldv_platform_instance_release_2_3 */
735 : void ldv_platform_instance_release_2_3(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
736 2 : (*arg0)(arg1);
737 1 : }
738 :
739 : /* AUX_FUNC ldv_pm_ops_scenario_1 */
740 : void ldv_pm_ops_scenario_1(void *arg0) {
741 : /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'pm_ops_scenario(pm)'", "function": "ldv_pm_ops_scenario_1"} */
742 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
743 1 : struct device *ldv_1_device_device;
744 1 : struct dev_pm_ops *ldv_1_pm_ops_dev_pm_ops;
745 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
746 1 : /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Ready for a power management scenarios."} */
747 3 : ldv_free(arg0);
748 1 : /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_END"} */
749 :
750 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
751 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
752 :
753 : /* Jump to a subprocess 'do' initial state */
754 1 : goto ldv_do_1;
755 : /* End of the process */
756 : return;
757 1 :
758 : /* Sbprocess do */
759 : ldv_do_1:
760 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
761 :
762 2 : switch (ldv_undef_int()) {
763 3 : case 1: {
764 : /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_BEGIN", "callback": true, "comment": "Device appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Invoke callback runtime_idle from PM."} */
765 3 : if (ldv_1_pm_ops_dev_pm_ops->runtime_idle) {
766 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->runtime_idle)(ldv_1_device_device);", "comment": "runtime_idle"} */
767 2 : ldv_pm_ops_scenario_runtime_idle_1_24(ldv_1_pm_ops_dev_pm_ops->runtime_idle, ldv_1_device_device);
768 : }
769 : /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_END"} */
770 :
771 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
772 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
773 :
774 : /* Jump to a subprocess 'do' initial state */
775 2 : goto ldv_do_1;
776 1 : break;
777 : }
778 3 : case 2: {
779 : /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "The device should be put into a low-power state to prevent communication of the device with the CPU(s) and RAM. Invoke callback runtime_suspend from PM."} */
780 3 : if (ldv_1_pm_ops_dev_pm_ops->runtime_suspend) {
781 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->runtime_suspend)(ldv_1_device_device);", "comment": "runtime_suspend"} */
782 2 : ldv_pm_ops_scenario_runtime_suspend_1_22(ldv_1_pm_ops_dev_pm_ops->runtime_suspend, ldv_1_device_device);
783 : }
784 : /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_END"} */
785 :
786 : /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Put the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. Invoke callback runtime_resume from PM."} */
787 6 : if (ldv_1_pm_ops_dev_pm_ops->runtime_resume) {
788 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->runtime_resume)(ldv_1_device_device);", "comment": "runtime_resume"} */
789 4 : ldv_pm_ops_scenario_runtime_resume_1_21(ldv_1_pm_ops_dev_pm_ops->runtime_resume, ldv_1_device_device);
790 : }
791 : /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_END"} */
792 :
793 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
794 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
795 :
796 : /* Jump to a subprocess 'do' initial state */
797 3 : goto ldv_do_1;
798 1 : break;
799 : }
800 3 : case 3: {
801 : /* LDV {"action": "PREPARE", "type": "CALL_BEGIN", "callback": true, "comment": "Prevent new children of the device from being registered. Invoke callback prepare from PM."} */
802 3 : if (ldv_1_pm_ops_dev_pm_ops->prepare) {
803 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->prepare)(ldv_1_device_device);", "comment": "prepare"} */
804 2 : ldv_pm_ops_scenario_prepare_1_19(ldv_1_pm_ops_dev_pm_ops->prepare, ldv_1_device_device);
805 : }
806 : /* LDV {"action": "PREPARE", "type": "CALL_END"} */
807 :
808 4 : switch (ldv_undef_int()) {
809 3 : case 1: {
810 : /* LDV {"action": "SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "Quiesce subsystem-level device before suspend. Invoke callback suspend from PM."} */
811 3 : if (ldv_1_pm_ops_dev_pm_ops->suspend) {
812 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->suspend)(ldv_1_device_device);", "comment": "suspend"} */
813 2 : ldv_pm_ops_scenario_suspend_1_18(ldv_1_pm_ops_dev_pm_ops->suspend, ldv_1_device_device);
814 : }
815 : /* LDV {"action": "SUSPEND", "type": "CALL_END"} */
816 :
817 6 : if (ldv_undef_int()) {
818 : /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Expect that the device will be in a low-power state. Invoke callback suspend_noirq from PM."} */
819 3 : if (ldv_1_pm_ops_dev_pm_ops->suspend_noirq) {
820 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->suspend_noirq)(ldv_1_device_device);", "comment": "suspend_noirq"} */
821 2 : ldv_pm_ops_scenario_suspend_noirq_1_17(ldv_1_pm_ops_dev_pm_ops->suspend_noirq, ldv_1_device_device);
822 : }
823 : /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_END"} */
824 :
825 : /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the #resume() performing actions that might be racing with device's interrupt handler. Invoke callback resume_noirq from PM."} */
826 6 : if (ldv_1_pm_ops_dev_pm_ops->resume_noirq) {
827 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->resume_noirq)(ldv_1_device_device);", "comment": "resume_noirq"} */
828 4 : ldv_pm_ops_scenario_resume_noirq_1_16(ldv_1_pm_ops_dev_pm_ops->resume_noirq, ldv_1_device_device);
829 : }
830 : /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_END"} */
831 :
832 : }
833 : else {
834 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
835 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
836 :
837 : }
838 : /* LDV {"action": "RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Make the device start working again after resume. Invoke callback resume from dev_pm_ops."} */
839 : /* LDV {"type": "CALLBACK", "call": "((& mmc_bus_resume))(ldv_1_device_device);", "comment": "resume"} */
840 6 : ldv_pm_ops_scenario_resume_1_14(ldv_1_pm_ops_dev_pm_ops->resume, ldv_1_device_device);
841 : /* LDV {"action": "RESUME", "type": "CALL_END"} */
842 :
843 1 : break;
844 1 : }
845 3 : case 2: {
846 : /* LDV {"action": "FREEZE", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for creating a hibernation image. Invoke callback freeze from PM."} */
847 3 : if (ldv_1_pm_ops_dev_pm_ops->freeze) {
848 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->freeze)(ldv_1_device_device);", "comment": "freeze"} */
849 2 : ldv_pm_ops_scenario_freeze_1_13(ldv_1_pm_ops_dev_pm_ops->freeze, ldv_1_device_device);
850 : }
851 : /* LDV {"action": "FREEZE", "type": "CALL_END"} */
852 :
853 6 : if (ldv_undef_int()) {
854 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
855 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
856 :
857 : }
858 : else {
859 : /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #freeze() that might be racing with device's interrupt handler. Invoke callback freeze_noirq from PM."} */
860 3 : if (ldv_1_pm_ops_dev_pm_ops->freeze_noirq) {
861 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->freeze_noirq)(ldv_1_device_device);", "comment": "freeze_noirq"} */
862 2 : ldv_pm_ops_scenario_freeze_noirq_1_11(ldv_1_pm_ops_dev_pm_ops->freeze_noirq, ldv_1_device_device);
863 : }
864 : /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_END"} */
865 :
866 : /* LDV {"action": "THAW_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #thaw() performing actions that might be racing with device's interrupt handler. Invoke callback thaw_noirq from PM."} */
867 6 : if (ldv_1_pm_ops_dev_pm_ops->thaw_noirq) {
868 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->thaw_noirq)(ldv_1_device_device);", "comment": "thaw_noirq"} */
869 4 : ldv_pm_ops_scenario_thaw_noirq_1_10(ldv_1_pm_ops_dev_pm_ops->thaw_noirq, ldv_1_device_device);
870 : }
871 : /* LDV {"action": "THAW_NOIRQ", "type": "CALL_END"} */
872 :
873 : }
874 : /* LDV {"action": "THAW", "type": "CALL_BEGIN", "callback": true, "comment": "The hibernation image has created or creation has failed. Invoke callback thaw from PM."} */
875 9 : if (ldv_1_pm_ops_dev_pm_ops->thaw) {
876 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->thaw)(ldv_1_device_device);", "comment": "thaw"} */
877 6 : ldv_pm_ops_scenario_thaw_1_9(ldv_1_pm_ops_dev_pm_ops->thaw, ldv_1_device_device);
878 : }
879 : /* LDV {"action": "THAW", "type": "CALL_END"} */
880 :
881 4 : break;
882 1 : }
883 3 : case 3: {
884 : /* LDV {"action": "POWEROFF", "type": "CALL_BEGIN", "callback": true, "comment": "Hibernation image has been created. Invoke callback poweroff from PM."} */
885 3 : if (ldv_1_pm_ops_dev_pm_ops->poweroff) {
886 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->poweroff)(ldv_1_device_device);", "comment": "poweroff"} */
887 2 : ldv_pm_ops_scenario_poweroff_1_8(ldv_1_pm_ops_dev_pm_ops->poweroff, ldv_1_device_device);
888 : }
889 : /* LDV {"action": "POWEROFF", "type": "CALL_END"} */
890 :
891 6 : if (ldv_undef_int()) {
892 : /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #poweroff(). Invoke callback poweroff_noirq from PM."} */
893 3 : if (ldv_1_pm_ops_dev_pm_ops->poweroff_noirq) {
894 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->poweroff_noirq)(ldv_1_device_device);", "comment": "poweroff_noirq"} */
895 2 : ldv_pm_ops_scenario_poweroff_noirq_1_7(ldv_1_pm_ops_dev_pm_ops->poweroff_noirq, ldv_1_device_device);
896 : }
897 : /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_END"} */
898 :
899 : /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #restore() performing actions that might be racing with device's interrupt handler. Invoke callback restore_noirq from PM."} */
900 6 : if (ldv_1_pm_ops_dev_pm_ops->restore_noirq) {
901 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->restore_noirq)(ldv_1_device_device);", "comment": "restore_noirq"} */
902 4 : ldv_pm_ops_scenario_restore_noirq_1_6(ldv_1_pm_ops_dev_pm_ops->restore_noirq, ldv_1_device_device);
903 : }
904 : /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_END"} */
905 :
906 : }
907 : else {
908 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
909 : /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
910 :
911 : }
912 : /* LDV {"action": "RESTORE", "type": "CALL_BEGIN", "callback": true, "comment": "Restoration of the contents of main memory from a hibernation image has been done. Invoke callback restore from PM."} */
913 9 : if (ldv_1_pm_ops_dev_pm_ops->restore) {
914 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->restore)(ldv_1_device_device);", "comment": "restore"} */
915 6 : ldv_pm_ops_scenario_restore_1_4(ldv_1_pm_ops_dev_pm_ops->restore, ldv_1_device_device);
916 : }
917 : /* LDV {"action": "RESTORE", "type": "CALL_END"} */
918 :
919 4 : break;
920 1 : }
921 2 : default: ldv_stop();
922 1 : }
923 0 : /* LDV {"action": "COMPLETE", "type": "CALL_BEGIN", "callback": true, "comment": "Undo the changes made by #prepare(). Invoke callback complete from PM."} */
924 27 : if (ldv_1_pm_ops_dev_pm_ops->complete) {
925 0 : /* LDV {"type": "CALLBACK", "call": "(ldv_1_pm_ops_dev_pm_ops->complete)(ldv_1_device_device);", "comment": "complete"} */
926 18 : ldv_pm_ops_scenario_complete_1_3(ldv_1_pm_ops_dev_pm_ops->complete, ldv_1_device_device);
927 : }
928 : /* LDV {"action": "COMPLETE", "type": "CALL_END"} */
929 :
930 : /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
931 : /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
932 :
933 : /* Jump to a subprocess 'do' initial state */
934 10 : goto ldv_do_1;
935 1 : break;
936 : }
937 3 : case 4: {
938 : /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Do not expect power management scenarios."} */
939 : /* Skip a non-replicative signal receiving */
940 : /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_END"} */
941 :
942 : /* Exit function at a terminal state */
943 1 : return;
944 1 : break;
945 : }
946 2 : default: ldv_stop();
947 1 : }
948 0 : /* End of the subprocess 'do' */
949 0 : return;
950 : /* LDV {"comment": "End of control function based on process 'pm_ops_scenario(pm)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_pm_ops_scenario_1"} */
951 : }
952 :
953 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_complete_1_3 */
954 : void ldv_pm_ops_scenario_complete_1_3(void (*arg0)(struct device *), struct device *arg1) {
955 36 : (*arg0)(arg1);
956 9 : }
957 :
958 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_1_13 */
959 : void ldv_pm_ops_scenario_freeze_1_13(int (*arg0)(struct device *), struct device *arg1) {
960 7 : (*arg0)(arg1);
961 1 : }
962 :
963 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_noirq_1_11 */
964 : void ldv_pm_ops_scenario_freeze_noirq_1_11(int (*arg0)(struct device *), struct device *arg1) {
965 7 : (*arg0)(arg1);
966 1 : }
967 :
968 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_1_8 */
969 : void ldv_pm_ops_scenario_poweroff_1_8(int (*arg0)(struct device *), struct device *arg1) {
970 7 : (*arg0)(arg1);
971 1 : }
972 :
973 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_noirq_1_7 */
974 : void ldv_pm_ops_scenario_poweroff_noirq_1_7(int (*arg0)(struct device *), struct device *arg1) {
975 7 : (*arg0)(arg1);
976 1 : }
977 :
978 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_prepare_1_19 */
979 : void ldv_pm_ops_scenario_prepare_1_19(int (*arg0)(struct device *), struct device *arg1) {
980 7 : (*arg0)(arg1);
981 1 : }
982 :
983 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_1_4 */
984 : void ldv_pm_ops_scenario_restore_1_4(int (*arg0)(struct device *), struct device *arg1) {
985 21 : (*arg0)(arg1);
986 3 : }
987 :
988 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_noirq_1_6 */
989 : void ldv_pm_ops_scenario_restore_noirq_1_6(int (*arg0)(struct device *), struct device *arg1) {
990 14 : (*arg0)(arg1);
991 2 : }
992 :
993 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_resume_noirq_1_16 */
994 : void ldv_pm_ops_scenario_resume_noirq_1_16(int (*arg0)(struct device *), struct device *arg1) {
995 14 : (*arg0)(arg1);
996 2 : }
997 :
998 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_idle_1_24 */
999 : void ldv_pm_ops_scenario_runtime_idle_1_24(int (*arg0)(struct device *), struct device *arg1) {
1000 7 : (*arg0)(arg1);
1001 1 : }
1002 :
1003 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_resume_1_21 */
1004 : void ldv_pm_ops_scenario_runtime_resume_1_21(int (*arg0)(struct device *), struct device *arg1) {
1005 14 : (*arg0)(arg1);
1006 2 : }
1007 :
1008 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_suspend_1_22 */
1009 : void ldv_pm_ops_scenario_runtime_suspend_1_22(int (*arg0)(struct device *), struct device *arg1) {
1010 7 : (*arg0)(arg1);
1011 1 : }
1012 :
1013 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_1_18 */
1014 : void ldv_pm_ops_scenario_suspend_1_18(int (*arg0)(struct device *), struct device *arg1) {
1015 7 : (*arg0)(arg1);
1016 1 : }
1017 :
1018 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_noirq_1_17 */
1019 : void ldv_pm_ops_scenario_suspend_noirq_1_17(int (*arg0)(struct device *), struct device *arg1) {
1020 7 : (*arg0)(arg1);
1021 1 : }
1022 :
1023 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_1_9 */
1024 : void ldv_pm_ops_scenario_thaw_1_9(int (*arg0)(struct device *), struct device *arg1) {
1025 21 : (*arg0)(arg1);
1026 3 : }
1027 :
1028 : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_noirq_1_10 */
1029 : void ldv_pm_ops_scenario_thaw_noirq_1_10(int (*arg0)(struct device *), struct device *arg1) {
1030 14 : (*arg0)(arg1);
1031 2 : }
1032 :
1033 : /* AUX_FUNC ldv_random_containerless_scenario_21 */
1034 : void ldv_random_containerless_scenario_21(void *arg0) {
1035 : /* LDV {"thread": 21, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_21"} */
1036 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1037 1 : int (*ldv_21_callback_get)(char *, struct kernel_param *);
1038 1 : int (*ldv_21_callback_set)(char *, struct kernel_param *);
1039 1 : struct kernel_param *ldv_21_container_struct_kernel_param;
1040 1 : char *ldv_21_ldv_param_10_0_default;
1041 1 : char *ldv_21_ldv_param_4_0_default;
1042 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1043 1 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
1044 3 : ldv_free(arg0);
1045 1 : /* LDV {"action": "DEFAULT_REGISTER_4", "type": "RECEIVE_END"} */
1046 :
1047 : /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1048 3 : ldv_21_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
1049 : /* LDV {"action": "DEFAULT_ALLOC_4", "type": "CONDITION_END"} */
1050 :
1051 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1052 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1053 :
1054 : /* Jump to a subprocess 'call' initial state */
1055 1 : goto ldv_call_21;
1056 : /* End of the process */
1057 : return;
1058 1 :
1059 : /* Sbprocess call */
1060 : ldv_call_21:
1061 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1062 :
1063 4 : if (ldv_undef_int()) {
1064 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1065 3 : ldv_21_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
1066 : /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
1067 :
1068 4 : if (ldv_undef_int()) {
1069 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
1070 3 : ldv_21_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
1071 : /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
1072 :
1073 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
1074 : /* LDV {"type": "CALLBACK", "call": "((& param_set_bool))(ldv_21_ldv_param_10_0_default, ldv_21_container_struct_kernel_param);", "comment": "callback"} */
1075 2 : ldv_random_containerless_scenario_callback_21_10(ldv_21_callback_set, ldv_21_ldv_param_10_0_default, ldv_21_container_struct_kernel_param);
1076 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1077 :
1078 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1079 2 : ldv_free(ldv_21_ldv_param_10_0_default);
1080 : /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
1081 :
1082 : }
1083 : else {
1084 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
1085 : /* LDV {"type": "CALLBACK", "call": "((& param_get_bool))(ldv_21_ldv_param_4_0_default, ldv_21_container_struct_kernel_param);", "comment": "callback"} */
1086 2 : ldv_random_containerless_scenario_callback_21_4(ldv_21_callback_get, ldv_21_ldv_param_4_0_default, ldv_21_container_struct_kernel_param);
1087 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1088 :
1089 : }
1090 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
1091 4 : ldv_free(ldv_21_ldv_param_4_0_default);
1092 : /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
1093 :
1094 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1095 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1096 :
1097 : /* Jump to a subprocess 'call' initial state */
1098 1 : goto ldv_call_21;
1099 : }
1100 : else {
1101 : /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1102 2 : ldv_free(ldv_21_container_struct_kernel_param);
1103 : /* LDV {"action": "DEFAULT_FREE_4", "type": "CONDITION_END"} */
1104 :
1105 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
1106 : /* Skip a non-replicative signal receiving */
1107 : /* LDV {"action": "DEFAULT_DEREGISTER_4", "type": "RECEIVE_END"} */
1108 :
1109 : /* Exit function at a terminal state */
1110 1 : return;
1111 : }
1112 : /* End of the subprocess 'call' */
1113 : return;
1114 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_21"} */
1115 : }
1116 :
1117 : /* AUX_FUNC ldv_random_containerless_scenario_22 */
1118 : void ldv_random_containerless_scenario_22(void *arg0) {
1119 : /* LDV {"thread": 22, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_mmc_bus_ops)'", "function": "ldv_random_containerless_scenario_22"} */
1120 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1121 1 : int (*ldv_22_callback_awake)(struct mmc_host *);
1122 1 : void (*ldv_22_callback_detect)(struct mmc_host *);
1123 1 : void (*ldv_22_callback_power_restore)(struct mmc_host *);
1124 1 : void (*ldv_22_callback_remove)(struct mmc_host *);
1125 1 : int (*ldv_22_callback_resume)(struct mmc_host *);
1126 1 : int (*ldv_22_callback_sleep)(struct mmc_host *);
1127 1 : int (*ldv_22_callback_suspend)(struct mmc_host *);
1128 1 : struct mmc_host *ldv_22_container_struct_mmc_host_ptr;
1129 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1130 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_MMC_BUS_OPS callbacks invocations scenario."} */
1131 2 : ldv_free(arg0);
1132 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1133 :
1134 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1135 3 : ldv_22_container_struct_mmc_host_ptr = ldv_xmalloc_unknown_size(0);
1136 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1137 :
1138 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1139 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1140 :
1141 : /* Jump to a subprocess 'call' initial state */
1142 1 : goto ldv_call_22;
1143 : /* End of the process */
1144 : return;
1145 1 :
1146 : /* Sbprocess call */
1147 : ldv_call_22:
1148 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1149 :
1150 2 : switch (ldv_undef_int()) {
1151 3 : case 1: {
1152 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from mmc_bus_ops."} */
1153 : /* LDV {"type": "CALLBACK", "call": "((& mmc_suspend))(ldv_22_container_struct_mmc_host_ptr);", "comment": "callback"} */
1154 2 : ldv_random_containerless_scenario_callback_22_13(ldv_22_callback_suspend, ldv_22_container_struct_mmc_host_ptr);
1155 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1156 :
1157 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1158 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1159 :
1160 : /* Jump to a subprocess 'call' initial state */
1161 1 : goto ldv_call_22;
1162 1 : break;
1163 : }
1164 3 : case 2: {
1165 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sleep from mmc_bus_ops."} */
1166 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sleep))(ldv_22_container_struct_mmc_host_ptr);", "comment": "callback"} */
1167 2 : ldv_random_containerless_scenario_callback_22_12(ldv_22_callback_sleep, ldv_22_container_struct_mmc_host_ptr);
1168 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1169 :
1170 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1171 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1172 :
1173 : /* Jump to a subprocess 'call' initial state */
1174 1 : goto ldv_call_22;
1175 : /* Jump to a subprocess 'call' initial state */
1176 : goto ldv_call_22;
1177 1 : break;
1178 : }
1179 3 : case 3: {
1180 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from mmc_bus_ops."} */
1181 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sdio_resume))(ldv_22_container_struct_mmc_host_ptr);", "comment": "callback"} */
1182 2 : ldv_random_containerless_scenario_callback_22_11(ldv_22_callback_resume, ldv_22_container_struct_mmc_host_ptr);
1183 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1184 :
1185 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1186 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1187 :
1188 : /* Jump to a subprocess 'call' initial state */
1189 1 : goto ldv_call_22;
1190 : /* Jump to a subprocess 'call' initial state */
1191 : goto ldv_call_22;
1192 : /* Jump to a subprocess 'call' initial state */
1193 : goto ldv_call_22;
1194 1 : break;
1195 : }
1196 3 : case 4: {
1197 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from mmc_bus_ops."} */
1198 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sdio_remove))(ldv_22_container_struct_mmc_host_ptr);", "comment": "callback"} */
1199 2 : ldv_random_containerless_scenario_callback_22_10(ldv_22_callback_remove, ldv_22_container_struct_mmc_host_ptr);
1200 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1201 :
1202 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1203 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1204 :
1205 : /* Jump to a subprocess 'call' initial state */
1206 1 : goto ldv_call_22;
1207 : /* Jump to a subprocess 'call' initial state */
1208 : goto ldv_call_22;
1209 : /* Jump to a subprocess 'call' initial state */
1210 : goto ldv_call_22;
1211 : /* Jump to a subprocess 'call' initial state */
1212 : goto ldv_call_22;
1213 1 : break;
1214 : }
1215 3 : case 5: {
1216 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback power_restore from mmc_bus_ops."} */
1217 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sd_power_restore))(ldv_22_container_struct_mmc_host_ptr);", "comment": "callback"} */
1218 2 : ldv_random_containerless_scenario_callback_22_9(ldv_22_callback_power_restore, ldv_22_container_struct_mmc_host_ptr);
1219 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1220 :
1221 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1222 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1223 :
1224 : /* Jump to a subprocess 'call' initial state */
1225 1 : goto ldv_call_22;
1226 : /* Jump to a subprocess 'call' initial state */
1227 : goto ldv_call_22;
1228 : /* Jump to a subprocess 'call' initial state */
1229 : goto ldv_call_22;
1230 : /* Jump to a subprocess 'call' initial state */
1231 : goto ldv_call_22;
1232 : /* Jump to a subprocess 'call' initial state */
1233 : goto ldv_call_22;
1234 1 : break;
1235 : }
1236 3 : case 6: {
1237 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback detect from mmc_bus_ops."} */
1238 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sd_detect))(ldv_22_container_struct_mmc_host_ptr);", "comment": "callback"} */
1239 2 : ldv_random_containerless_scenario_callback_22_8(ldv_22_callback_detect, ldv_22_container_struct_mmc_host_ptr);
1240 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1241 :
1242 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1243 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1244 :
1245 : /* Jump to a subprocess 'call' initial state */
1246 1 : goto ldv_call_22;
1247 : /* Jump to a subprocess 'call' initial state */
1248 : goto ldv_call_22;
1249 : /* Jump to a subprocess 'call' initial state */
1250 : goto ldv_call_22;
1251 : /* Jump to a subprocess 'call' initial state */
1252 : goto ldv_call_22;
1253 : /* Jump to a subprocess 'call' initial state */
1254 : goto ldv_call_22;
1255 : /* Jump to a subprocess 'call' initial state */
1256 : goto ldv_call_22;
1257 1 : break;
1258 : }
1259 3 : case 7: {
1260 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback awake from mmc_bus_ops."} */
1261 : /* LDV {"type": "CALLBACK", "call": "((& mmc_awake))(ldv_22_container_struct_mmc_host_ptr);", "comment": "callback"} */
1262 2 : ldv_random_containerless_scenario_callback_22_4(ldv_22_callback_awake, ldv_22_container_struct_mmc_host_ptr);
1263 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1264 :
1265 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1266 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1267 :
1268 : /* Jump to a subprocess 'call' initial state */
1269 1 : goto ldv_call_22;
1270 : /* Jump to a subprocess 'call' initial state */
1271 : goto ldv_call_22;
1272 : /* Jump to a subprocess 'call' initial state */
1273 : goto ldv_call_22;
1274 : /* Jump to a subprocess 'call' initial state */
1275 : goto ldv_call_22;
1276 : /* Jump to a subprocess 'call' initial state */
1277 : goto ldv_call_22;
1278 : /* Jump to a subprocess 'call' initial state */
1279 : goto ldv_call_22;
1280 : /* Jump to a subprocess 'call' initial state */
1281 : goto ldv_call_22;
1282 1 : break;
1283 : }
1284 3 : case 8: {
1285 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1286 2 : ldv_free(ldv_22_container_struct_mmc_host_ptr);
1287 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1288 :
1289 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_MMC_BUS_OPS callbacks invocations scenario."} */
1290 : /* Skip a non-replicative signal receiving */
1291 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1292 :
1293 : /* Exit function at a terminal state */
1294 1 : return;
1295 1 : break;
1296 : }
1297 2 : default: ldv_stop();
1298 1 : }
1299 0 : /* End of the subprocess 'call' */
1300 0 : return;
1301 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_mmc_bus_ops)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_22"} */
1302 : }
1303 :
1304 : /* AUX_FUNC ldv_random_containerless_scenario_23 */
1305 : void ldv_random_containerless_scenario_23(void *arg0) {
1306 : /* LDV {"thread": 23, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_mmc_bus_ops)'", "function": "ldv_random_containerless_scenario_23"} */
1307 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1308 1 : int (*ldv_23_callback_awake)(struct mmc_host *);
1309 1 : void (*ldv_23_callback_detect)(struct mmc_host *);
1310 1 : void (*ldv_23_callback_power_restore)(struct mmc_host *);
1311 1 : void (*ldv_23_callback_remove)(struct mmc_host *);
1312 1 : int (*ldv_23_callback_resume)(struct mmc_host *);
1313 1 : int (*ldv_23_callback_sleep)(struct mmc_host *);
1314 1 : int (*ldv_23_callback_suspend)(struct mmc_host *);
1315 1 : struct mmc_host *ldv_23_container_struct_mmc_host_ptr;
1316 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1317 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_MMC_BUS_OPS callbacks invocations scenario."} */
1318 2 : ldv_free(arg0);
1319 : /* LDV {"action": "DEFAULT_REGISTER_5", "type": "RECEIVE_END"} */
1320 :
1321 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
1322 3 : ldv_23_container_struct_mmc_host_ptr = ldv_xmalloc_unknown_size(0);
1323 : /* LDV {"action": "DEFAULT_ALLOC_5", "type": "CONDITION_END"} */
1324 :
1325 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1326 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1327 :
1328 : /* Jump to a subprocess 'call' initial state */
1329 1 : goto ldv_call_23;
1330 : /* End of the process */
1331 : return;
1332 1 :
1333 : /* Sbprocess call */
1334 : ldv_call_23:
1335 : /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
1336 :
1337 2 : switch (ldv_undef_int()) {
1338 3 : case 1: {
1339 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback suspend from mmc_bus_ops."} */
1340 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sdio_suspend))(ldv_23_container_struct_mmc_host_ptr);", "comment": "callback"} */
1341 2 : ldv_random_containerless_scenario_callback_23_13(ldv_23_callback_suspend, ldv_23_container_struct_mmc_host_ptr);
1342 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1343 :
1344 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1345 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1346 :
1347 : /* Jump to a subprocess 'call' initial state */
1348 1 : goto ldv_call_23;
1349 1 : break;
1350 : }
1351 3 : case 2: {
1352 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback sleep from mmc_bus_ops."} */
1353 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sleep))(ldv_23_container_struct_mmc_host_ptr);", "comment": "callback"} */
1354 2 : ldv_random_containerless_scenario_callback_23_12(ldv_23_callback_sleep, ldv_23_container_struct_mmc_host_ptr);
1355 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1356 :
1357 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1358 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1359 :
1360 : /* Jump to a subprocess 'call' initial state */
1361 1 : goto ldv_call_23;
1362 : /* Jump to a subprocess 'call' initial state */
1363 : goto ldv_call_23;
1364 1 : break;
1365 : }
1366 3 : case 3: {
1367 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback resume from mmc_bus_ops."} */
1368 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sd_resume))(ldv_23_container_struct_mmc_host_ptr);", "comment": "callback"} */
1369 2 : ldv_random_containerless_scenario_callback_23_11(ldv_23_callback_resume, ldv_23_container_struct_mmc_host_ptr);
1370 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1371 :
1372 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1373 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1374 :
1375 : /* Jump to a subprocess 'call' initial state */
1376 1 : goto ldv_call_23;
1377 : /* Jump to a subprocess 'call' initial state */
1378 : goto ldv_call_23;
1379 : /* Jump to a subprocess 'call' initial state */
1380 : goto ldv_call_23;
1381 1 : break;
1382 : }
1383 3 : case 4: {
1384 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback remove from mmc_bus_ops."} */
1385 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sd_remove))(ldv_23_container_struct_mmc_host_ptr);", "comment": "callback"} */
1386 2 : ldv_random_containerless_scenario_callback_23_10(ldv_23_callback_remove, ldv_23_container_struct_mmc_host_ptr);
1387 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1388 :
1389 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1390 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1391 :
1392 : /* Jump to a subprocess 'call' initial state */
1393 1 : goto ldv_call_23;
1394 : /* Jump to a subprocess 'call' initial state */
1395 : goto ldv_call_23;
1396 : /* Jump to a subprocess 'call' initial state */
1397 : goto ldv_call_23;
1398 : /* Jump to a subprocess 'call' initial state */
1399 : goto ldv_call_23;
1400 1 : break;
1401 : }
1402 3 : case 5: {
1403 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback power_restore from mmc_bus_ops."} */
1404 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sd_power_restore))(ldv_23_container_struct_mmc_host_ptr);", "comment": "callback"} */
1405 2 : ldv_random_containerless_scenario_callback_23_9(ldv_23_callback_power_restore, ldv_23_container_struct_mmc_host_ptr);
1406 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1407 :
1408 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1409 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1410 :
1411 : /* Jump to a subprocess 'call' initial state */
1412 1 : goto ldv_call_23;
1413 : /* Jump to a subprocess 'call' initial state */
1414 : goto ldv_call_23;
1415 : /* Jump to a subprocess 'call' initial state */
1416 : goto ldv_call_23;
1417 : /* Jump to a subprocess 'call' initial state */
1418 : goto ldv_call_23;
1419 : /* Jump to a subprocess 'call' initial state */
1420 : goto ldv_call_23;
1421 1 : break;
1422 : }
1423 3 : case 6: {
1424 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback detect from mmc_bus_ops."} */
1425 : /* LDV {"type": "CALLBACK", "call": "((& mmc_sdio_detect))(ldv_23_container_struct_mmc_host_ptr);", "comment": "callback"} */
1426 2 : ldv_random_containerless_scenario_callback_23_8(ldv_23_callback_detect, ldv_23_container_struct_mmc_host_ptr);
1427 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1428 :
1429 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1430 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1431 :
1432 : /* Jump to a subprocess 'call' initial state */
1433 1 : goto ldv_call_23;
1434 : /* Jump to a subprocess 'call' initial state */
1435 : goto ldv_call_23;
1436 : /* Jump to a subprocess 'call' initial state */
1437 : goto ldv_call_23;
1438 : /* Jump to a subprocess 'call' initial state */
1439 : goto ldv_call_23;
1440 : /* Jump to a subprocess 'call' initial state */
1441 : goto ldv_call_23;
1442 : /* Jump to a subprocess 'call' initial state */
1443 : goto ldv_call_23;
1444 1 : break;
1445 : }
1446 3 : case 7: {
1447 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback awake from mmc_bus_ops."} */
1448 : /* LDV {"type": "CALLBACK", "call": "((& mmc_awake))(ldv_23_container_struct_mmc_host_ptr);", "comment": "callback"} */
1449 2 : ldv_random_containerless_scenario_callback_23_4(ldv_23_callback_awake, ldv_23_container_struct_mmc_host_ptr);
1450 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1451 :
1452 : /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
1453 : /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
1454 :
1455 : /* Jump to a subprocess 'call' initial state */
1456 1 : goto ldv_call_23;
1457 : /* Jump to a subprocess 'call' initial state */
1458 : goto ldv_call_23;
1459 : /* Jump to a subprocess 'call' initial state */
1460 : goto ldv_call_23;
1461 : /* Jump to a subprocess 'call' initial state */
1462 : goto ldv_call_23;
1463 : /* Jump to a subprocess 'call' initial state */
1464 : goto ldv_call_23;
1465 : /* Jump to a subprocess 'call' initial state */
1466 : goto ldv_call_23;
1467 : /* Jump to a subprocess 'call' initial state */
1468 : goto ldv_call_23;
1469 1 : break;
1470 : }
1471 3 : case 8: {
1472 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
1473 2 : ldv_free(ldv_23_container_struct_mmc_host_ptr);
1474 : /* LDV {"action": "DEFAULT_FREE_5", "type": "CONDITION_END"} */
1475 :
1476 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_MMC_BUS_OPS callbacks invocations scenario."} */
1477 : /* Skip a non-replicative signal receiving */
1478 : /* LDV {"action": "DEFAULT_DEREGISTER_5", "type": "RECEIVE_END"} */
1479 :
1480 : /* Exit function at a terminal state */
1481 1 : return;
1482 1 : break;
1483 : }
1484 2 : default: ldv_stop();
1485 1 : }
1486 0 : /* End of the subprocess 'call' */
1487 0 : return;
1488 : /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_mmc_bus_ops)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_23"} */
1489 : }
1490 :
1491 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_21_10 */
1492 : void ldv_random_containerless_scenario_callback_21_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
1493 1 : ((& param_set_bool))(arg1, arg2);
1494 1 : }
1495 :
1496 : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_21_4 */
1497 : void ldv_random_containerless_scenario_callback_21_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
1498 1 : ((& param_get_bool))(arg1, arg2);
1499 1 : }
1500 :
1501 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_10_11 */
1502 : int ldv_rtc_class_scenario_probe_10_11(int (*arg0)(struct device *), struct device *arg1) {
1503 8 : return (*arg0)(arg1);
1504 1 : }
1505 :
1506 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_11_11 */
1507 : int ldv_rtc_class_scenario_probe_11_11(int (*arg0)(struct device *), struct device *arg1) {
1508 8 : return (*arg0)(arg1);
1509 1 : }
1510 :
1511 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_12_11 */
1512 : int ldv_rtc_class_scenario_probe_12_11(int (*arg0)(struct device *), struct device *arg1) {
1513 8 : return (*arg0)(arg1);
1514 1 : }
1515 :
1516 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_13_11 */
1517 : int ldv_rtc_class_scenario_probe_13_11(int (*arg0)(struct device *), struct device *arg1) {
1518 8 : return (*arg0)(arg1);
1519 1 : }
1520 :
1521 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_14_11 */
1522 : int ldv_rtc_class_scenario_probe_14_11(int (*arg0)(struct device *), struct device *arg1) {
1523 8 : return (*arg0)(arg1);
1524 1 : }
1525 :
1526 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_15_11 */
1527 : int ldv_rtc_class_scenario_probe_15_11(int (*arg0)(struct device *), struct device *arg1) {
1528 8 : return (*arg0)(arg1);
1529 1 : }
1530 :
1531 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_16_11 */
1532 : int ldv_rtc_class_scenario_probe_16_11(int (*arg0)(struct device *), struct device *arg1) {
1533 8 : return (*arg0)(arg1);
1534 1 : }
1535 :
1536 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_17_11 */
1537 : int ldv_rtc_class_scenario_probe_17_11(int (*arg0)(struct device *), struct device *arg1) {
1538 8 : return (*arg0)(arg1);
1539 1 : }
1540 :
1541 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_18_11 */
1542 : int ldv_rtc_class_scenario_probe_18_11(int (*arg0)(struct device *), struct device *arg1) {
1543 8 : return (*arg0)(arg1);
1544 1 : }
1545 :
1546 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_19_11 */
1547 : int ldv_rtc_class_scenario_probe_19_11(int (*arg0)(struct device *), struct device *arg1) {
1548 8 : return (*arg0)(arg1);
1549 1 : }
1550 :
1551 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_20_11 */
1552 : int ldv_rtc_class_scenario_probe_20_11(int (*arg0)(struct device *), struct device *arg1) {
1553 8 : return (*arg0)(arg1);
1554 1 : }
1555 :
1556 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_3_11 */
1557 : int ldv_rtc_class_scenario_probe_3_11(int (*arg0)(struct device *), struct device *arg1) {
1558 8 : return (*arg0)(arg1);
1559 1 : }
1560 :
1561 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_4_11 */
1562 : int ldv_rtc_class_scenario_probe_4_11(int (*arg0)(struct device *), struct device *arg1) {
1563 8 : return (*arg0)(arg1);
1564 1 : }
1565 :
1566 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_5_11 */
1567 : int ldv_rtc_class_scenario_probe_5_11(int (*arg0)(struct device *), struct device *arg1) {
1568 8 : return (*arg0)(arg1);
1569 1 : }
1570 :
1571 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_6_11 */
1572 : int ldv_rtc_class_scenario_probe_6_11(int (*arg0)(struct device *), struct device *arg1) {
1573 8 : return (*arg0)(arg1);
1574 1 : }
1575 :
1576 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_7_11 */
1577 : int ldv_rtc_class_scenario_probe_7_11(int (*arg0)(struct device *), struct device *arg1) {
1578 8 : return (*arg0)(arg1);
1579 1 : }
1580 :
1581 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_8_11 */
1582 : int ldv_rtc_class_scenario_probe_8_11(int (*arg0)(struct device *), struct device *arg1) {
1583 8 : return (*arg0)(arg1);
1584 1 : }
1585 :
1586 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_probe_9_11 */
1587 : int ldv_rtc_class_scenario_probe_9_11(int (*arg0)(struct device *), struct device *arg1) {
1588 8 : return (*arg0)(arg1);
1589 1 : }
1590 :
1591 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_10_2 */
1592 : void ldv_rtc_class_scenario_release_10_2(void (*arg0)(struct device *), struct device *arg1) {
1593 4 : (*arg0)(arg1);
1594 1 : }
1595 :
1596 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_11_2 */
1597 : void ldv_rtc_class_scenario_release_11_2(void (*arg0)(struct device *), struct device *arg1) {
1598 4 : (*arg0)(arg1);
1599 1 : }
1600 :
1601 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_12_2 */
1602 : void ldv_rtc_class_scenario_release_12_2(void (*arg0)(struct device *), struct device *arg1) {
1603 4 : (*arg0)(arg1);
1604 1 : }
1605 :
1606 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_13_2 */
1607 : void ldv_rtc_class_scenario_release_13_2(void (*arg0)(struct device *), struct device *arg1) {
1608 4 : (*arg0)(arg1);
1609 1 : }
1610 :
1611 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_14_2 */
1612 : void ldv_rtc_class_scenario_release_14_2(void (*arg0)(struct device *), struct device *arg1) {
1613 4 : (*arg0)(arg1);
1614 1 : }
1615 :
1616 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_15_2 */
1617 : void ldv_rtc_class_scenario_release_15_2(void (*arg0)(struct device *), struct device *arg1) {
1618 4 : (*arg0)(arg1);
1619 1 : }
1620 :
1621 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_16_2 */
1622 : void ldv_rtc_class_scenario_release_16_2(void (*arg0)(struct device *), struct device *arg1) {
1623 4 : (*arg0)(arg1);
1624 1 : }
1625 :
1626 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_17_2 */
1627 : void ldv_rtc_class_scenario_release_17_2(void (*arg0)(struct device *), struct device *arg1) {
1628 4 : (*arg0)(arg1);
1629 1 : }
1630 :
1631 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_18_2 */
1632 : void ldv_rtc_class_scenario_release_18_2(void (*arg0)(struct device *), struct device *arg1) {
1633 4 : (*arg0)(arg1);
1634 1 : }
1635 :
1636 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_19_2 */
1637 : void ldv_rtc_class_scenario_release_19_2(void (*arg0)(struct device *), struct device *arg1) {
1638 4 : (*arg0)(arg1);
1639 1 : }
1640 :
1641 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_20_2 */
1642 : void ldv_rtc_class_scenario_release_20_2(void (*arg0)(struct device *), struct device *arg1) {
1643 4 : (*arg0)(arg1);
1644 1 : }
1645 :
1646 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_3_2 */
1647 : void ldv_rtc_class_scenario_release_3_2(void (*arg0)(struct device *), struct device *arg1) {
1648 4 : (*arg0)(arg1);
1649 1 : }
1650 :
1651 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_4_2 */
1652 : void ldv_rtc_class_scenario_release_4_2(void (*arg0)(struct device *), struct device *arg1) {
1653 4 : (*arg0)(arg1);
1654 1 : }
1655 :
1656 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_5_2 */
1657 : void ldv_rtc_class_scenario_release_5_2(void (*arg0)(struct device *), struct device *arg1) {
1658 4 : (*arg0)(arg1);
1659 1 : }
1660 :
1661 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_6_2 */
1662 : void ldv_rtc_class_scenario_release_6_2(void (*arg0)(struct device *), struct device *arg1) {
1663 4 : (*arg0)(arg1);
1664 1 : }
1665 :
1666 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_7_2 */
1667 : void ldv_rtc_class_scenario_release_7_2(void (*arg0)(struct device *), struct device *arg1) {
1668 4 : (*arg0)(arg1);
1669 1 : }
1670 :
1671 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_8_2 */
1672 : void ldv_rtc_class_scenario_release_8_2(void (*arg0)(struct device *), struct device *arg1) {
1673 4 : (*arg0)(arg1);
1674 1 : }
1675 :
1676 : /* AUX_FUNC_CALLBACK ldv_rtc_class_scenario_release_9_2 */
1677 : void ldv_rtc_class_scenario_release_9_2(void (*arg0)(struct device *), struct device *arg1) {
1678 4 : (*arg0)(arg1);
1679 1 : }
1680 :
1681 : /* AUX_FUNC ldv_timer_scenario_24 */
1682 : void ldv_timer_scenario_24(void *arg0) {
1683 : /* LDV {"thread": 24, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'timer_scenario(timer)'", "function": "ldv_timer_scenario_24"} */
1684 1 : /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
1685 1 : struct timer_list *ldv_24_container_timer_list;
1686 : /* Received labels */
1687 1 : struct ldv_struct_timer_scenario_24 *data = (struct ldv_struct_timer_scenario_24*) arg0;
1688 :
1689 : /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
1690 : /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin TIMER callbacks invocations scenario."} */
1691 : /* Assign recieved labels */
1692 2 : if (data) {
1693 1 : ldv_24_container_timer_list = data->arg0;
1694 2 : ldv_free(data);
1695 : }
1696 : /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_END"} */
1697 :
1698 : /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Time has come: call the timer callback. Invoke callback callback from TIMER."} */
1699 : /* Callback pre-call */
1700 2 : ldv_switch_to_interrupt_context();
1701 6 : if (ldv_24_container_timer_list->function) {
1702 : /* LDV {"type": "CALLBACK", "call": "(ldv_24_container_timer_list->function)(ldv_24_container_timer_list->data);", "comment": "callback"} */
1703 4 : ldv_timer_scenario_callback_24_2(ldv_24_container_timer_list->function, ldv_24_container_timer_list->data);
1704 : }
1705 : /* Callback post-call */
1706 3 : ldv_switch_to_process_context();
1707 : /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
1708 :
1709 : /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish TIMER callbacks invocations scenario."} */
1710 : /* Skip a non-replicative signal receiving */
1711 : /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_END"} */
1712 :
1713 : /* Exit function at a terminal state */
1714 3 : return;
1715 : /* End of the process */
1716 : return;
1717 : /* LDV {"comment": "End of control function based on process 'timer_scenario(timer)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_timer_scenario_24"} */
1718 : }
1719 :
1720 : /* AUX_FUNC_CALLBACK ldv_timer_scenario_callback_24_2 */
1721 : void ldv_timer_scenario_callback_24_2(void (*arg0)(unsigned long), unsigned long arg1) {
1722 2 : (*arg0)(arg1);
1723 2 : }
1724 :
1725 : /* AUX_FUNC main */
1726 : int main() {
1727 1 : ldv_main_27(0);
1728 0 : return 0;
1729 : }
1730 :
1731 :
1732 : /* AUX_FUNC ERR_PTR */
1733 : static inline void *ERR_PTR (long int error)
1734 : {
1735 :
1736 : return ldv_err_ptr(error);
1737 : }
1738 :
1739 : /* AUX_FUNC PTR_ERR */
1740 : static inline long int PTR_ERR (void const *ptr)
1741 : {
1742 :
1743 : return ldv_ptr_err(ptr);
1744 : }
1745 :
1746 : /* AUX_FUNC IS_ERR */
1747 : static inline long int IS_ERR (void const *ptr)
1748 : {
1749 :
1750 : return ldv_is_err(ptr);
1751 : }
1752 :
1753 : /* AUX_FUNC IS_ERR_OR_NULL */
1754 : static inline long int IS_ERR_OR_NULL (void const *ptr)
1755 : {
1756 :
1757 : return ldv_is_err_or_null(ptr);
1758 : }
1759 :
1760 : /* AUX_FUNC kzalloc */
1761 : static inline void *kzalloc (size_t size, gfp_t flags)
1762 : {
1763 :
1764 : return ldv_kzalloc(size, flags);
1765 : }
|