函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\suspend.c Create Date:2022-07-27 10:58:29
Last Modify:2020-03-17 14:47:48 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:suspend_enter - Make the system enter the given sleep state.*@state: System sleep state to enter.*@wakeup: Returns information that the sleep state should not be re-entered.* This function should be called after devices have been suspended.

函数原型:static int suspend_enter(suspend_state_t state, bool *wakeup)

返回类型:int

参数:

类型参数名称
suspend_state_tstate
bool *wakeup
395  error等于platform_suspend_prepare(state)
396  如果error则转到:Platform_finish
399  error等于dpm_suspend_late(PMSG_SUSPEND)
400  如果error
401  打印错误信息("late suspend of devices failed\n")
402  转到:Platform_finish
404  error等于platform_suspend_prepare_late(state)
405  如果error则转到:Devices_early_resume
408  error等于dpm_suspend_noirq(PMSG_SUSPEND)
409  如果error
410  打印错误信息("noirq suspend of devices failed\n")
411  转到:Platform_early_resume
413  error等于platform_suspend_prepare_noirq(state)
414  如果error则转到:Platform_wake
417  如果suspend_test(TEST_PLATFORM)则转到:Platform_wake
420  如果state恒等于PM_SUSPEND_TO_IDLE
421  s2idle_loop()
422  转到:Platform_wake
425  error等于suspend_disable_secondary_cpus()
426  如果errorsuspend_test(TEST_CPUS)则转到:Enable_cpus
429  default implementation
430  BUG_ON(!已禁止中断())
432  Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE.等于SYSTEM_SUSPEND
434  error等于syscore_suspend()
435  如果非error
436  wakeup等于pm_wakeup_pending()
437  如果非suspend_test(TEST_CORE)或wakeup的值则
438  trace_suspend_resume(TPS("machine_suspend"), state, true)
440  error等于enter(state)
441  trace_suspend_resume(TPS("machine_suspend"), state, false)
443  否则如果wakeup
444  error等于负EBUSY
446  syscore_resume()
449  Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE.等于SYSTEM_RUNNING
451  default implementation
452  BUG_ON(已禁止中断())
454  Enable_cpus :
455  suspend_enable_secondary_cpus()
457  Platform_wake :
458  platform_resume_noirq(state)
459  dpm_resume_noirq(PMSG_RESUME)
461  Platform_early_resume :
462  platform_resume_early(state)
464  Devices_early_resume :
465  dpm_resume_early(PMSG_RESUME)
467  Platform_finish :
468  platform_resume_finish(state)
469  返回:error
调用者
名称描述
suspend_devices_and_entersuspend_devices_and_enter - Suspend devices and enter system sleep state.*@state: System sleep state to enter.