Function report |
Source Code:kernel\power\hibernate.c |
Create Date:2022-07-28 09:59:11 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:reate_image - Create a hibernation image.*@platform_mode: Whether or not to use the platform driver.* Execute device drivers' "late" and "noirq" freeze callbacks, create a* hibernation image and run the drivers' "noirq" and "early" thaw callbacks.
Proto:static int create_image(int platform_mode)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
int | platform_mode |
278 | error = dpm_suspend_end(PMSG_FREEZE) |
279 | If error Then |
285 | If error || hibernation_test(TEST_PLATFORM) Then Go to Platform_finish |
288 | error = suspend_disable_secondary_cpus() |
289 | If error || hibernation_test(TEST_CPUS) Then Go to Enable_cpus |
292 | local_irq_disable() |
294 | Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. = SYSTEM_SUSPEND |
296 | error = syscore_suspend() |
297 | If error Then |
298 | pr_err("Some system devices failed to power down, aborting hibernation\n") |
299 | Go to Enable_irqs |
302 | If hibernation_test(TEST_CORE) || pm_wakeup_pending() Then Go to Power_up |
305 | in_suspend = 1 |
306 | save_processor_state() |
307 | trace_suspend_resume(TPS("machine_suspend"), Hibernation image has been saved, true) |
308 | error = swsusp_arch_suspend() |
310 | restore_processor_state() |
311 | trace_suspend_resume(TPS("machine_suspend"), Hibernation image has been saved, false) |
315 | If Not in_suspend Then |
316 | events_check_enabled = false |
317 | clear_free_pages() |
322 | Power_up : |
323 | syscore_resume() |
325 | Enable_irqs : |
326 | Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. = SYSTEM_RUNNING |
329 | Enable_cpus : |
333 | If Not in_suspend Then error = arch_resume_nosmt() |
336 | Platform_finish : |
339 | dpm_resume_start(in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE) |
342 | Return error |
Name | Describe |
---|---|
hibernation_snapshot | hibernation_snapshot - Quiesce devices and create a hibernation image.*@platform_mode: If set, use platform driver to prepare for the transition.* This routine must be called with system_transition_mutex held. |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |