函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\hibernate.c Create Date:2022-07-27 10:59:19
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static int create_image(int platform_mode)

返回类型:int

参数:

类型参数名称
intplatform_mode
278  error等于dpm_suspend_end(PMSG_FREEZE)
279  如果error
280  打印错误信息("Some devices failed to power down, aborting hibernation\n")
281  返回:error
284  error等于platform_pre_snapshot - Call platform to prepare the machine for hibernation.*@platform_mode: Whether or not to use the platform driver.* Use the platform driver to prepare the system for creating a hibernate image,
285  如果errorhibernation_test(TEST_PLATFORM)则转到:Platform_finish
288  error等于suspend_disable_secondary_cpus()
289  如果errorhibernation_test(TEST_CPUS)则转到:Enable_cpus
292  禁止中断()
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  如果error
298  打印错误信息("Some system devices failed to power down, aborting hibernation\n")
299  转到:Enable_irqs
302  如果hibernation_test(TEST_CORE)或pm_wakeup_pending()则转到:Power_up
305  in_suspend等于1
306  save_processor_state()
307  trace_suspend_resume(TPS("machine_suspend"), PM_EVENT_HIBERNATE, true)
308  error等于swsusp_arch_suspend()
310  restore_processor_state()
311  trace_suspend_resume(TPS("machine_suspend"), PM_EVENT_HIBERNATE, false)
312  如果error打印错误信息("Error %d creating hibernation image\n", error)
315  如果非in_suspend
316  events_check_enabled = false
317  clear_free_pages()
320  platform_leave - Call platform to prepare a transition to the working state.*@platform_mode: Whether or not to use the platform driver.* Use the platform driver prepare to prepare the machine for switching to the* normal mode of operation.
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
327  开中断()
329  Enable_cpus :
330  suspend_enable_secondary_cpus()
333  如果非in_suspenderror等于arch_resume_nosmt()
336  Platform_finish :
337  platform_finish - Call platform to switch the system to the working state.*@platform_mode: Whether or not to use the platform driver.* Use the platform driver to switch the machine to the normal mode of* operation.
339  dpm_resume_start(in_suspend ? (error ? PMSG_RECOVER : PMSG_THAW) : PMSG_RESTORE)
342  返回:error
调用者
名称描述
hibernation_snapshothibernation_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.