Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\hibernate.c Create Date:2022-07-28 09:59:20
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hibernation_platform_enter - Power off the system using the platform driver.

Proto:int hibernation_platform_enter(void)

Type:int

Parameter:Nothing

546  If Not hibernation_ops Then Return -ENOSYS
554  error = begin(PMSG_HIBERNATE)
555  If error Then Go to Close
558  entering_platform_hibernation = true
559  Suspend and resume console messages over PM events
560  error = dpm_suspend_start(PMSG_HIBERNATE)
561  If error Then
562  If recover Then recover()
564  Go to Resume_devices
567  error = dpm_suspend_end(PMSG_HIBERNATE)
568  If error Then Go to Resume_devices
571  error = prepare()
572  If error Then Go to Platform_finish
575  error = suspend_disable_secondary_cpus()
576  If error Then Go to Enable_cpus
579  local_irq_disable()
580  Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. = SYSTEM_SUSPEND
581  syscore_suspend()
582  If pm_wakeup_pending() Then
583  error = -EAGAIN
584  Go to Power_up
587  enter()
589  When 1 cycle
591  Power_up :
592  syscore_resume()
593  Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. = SYSTEM_RUNNING
594  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
596  Enable_cpus :
597  suspend_enable_secondary_cpus()
599  Platform_finish :
600  finish()
602  dpm_resume_start(PMSG_RESTORE)
604  Resume_devices :
605  entering_platform_hibernation = false
606  dpm_resume_end(PMSG_RESTORE)
607  resume_console()
609  Close :
610  end()
612  Return error
Caller
NameDescribe
power_downpower_down - Shut the machine down for hibernation.* Use the platform driver, if configured, to put the system into the sleep* state corresponding to hibernation, or try to power it off or reboot,* depending on the value of hibernation_mode.
snapshot_ioctl