Function report |
Source Code:kernel\power\suspend.c |
Create Date:2022-07-28 09:58:20 |
| Last Modify:2020-03-17 14:47:48 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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.
Proto:static int suspend_enter(suspend_state_t state, bool *wakeup)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| suspend_state_t | state | |
| bool * | wakeup |
| 395 | error = platform_suspend_prepare(state) |
| 396 | If error Then Go to Platform_finish |
| 399 | error = dpm_suspend_late(PMSG_SUSPEND) |
| 400 | If error Then |
| 401 | pr_err("late suspend of devices failed\n") |
| 402 | Go to Platform_finish |
| 405 | If error Then Go to Devices_early_resume |
| 408 | error = dpm_suspend_noirq(PMSG_SUSPEND) |
| 409 | If error Then |
| 410 | pr_err("noirq suspend of devices failed\n") |
| 411 | Go to Platform_early_resume |
| 414 | If error Then Go to Platform_wake |
| 417 | If suspend_test(TEST_PLATFORM) Then Go to Platform_wake |
| 420 | If state == PM_SUSPEND_TO_IDLE Then |
| 421 | s2idle_loop() |
| 422 | Go to Platform_wake |
| 425 | error = suspend_disable_secondary_cpus() |
| 426 | If error || suspend_test(TEST_CPUS) Then Go to Enable_cpus |
| 430 | BUG_ON(!Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.()) |
| 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 | If Not error Then |
| 436 | wakeup = pm_wakeup_pending() |
| 437 | If Not (suspend_test(TEST_CORE) || wakeup) Then |
| 438 | trace_suspend_resume(TPS("machine_suspend"), state, true) |
| 441 | trace_suspend_resume(TPS("machine_suspend"), state, false) |
| 443 | Else if wakeup Then |
| 446 | syscore_resume() |
| 449 | Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE. = SYSTEM_RUNNING |
| 452 | BUG_ON(Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.()) |
| 454 | Enable_cpus : |
| 457 | Platform_wake : |
| 461 | Platform_early_resume : |
| 464 | Devices_early_resume : |
| 467 | Platform_finish : |
| 469 | Return error |
| Name | Describe |
|---|---|
| suspend_devices_and_enter | suspend_devices_and_enter - Suspend devices and enter system sleep state.*@state: System sleep state to enter. |
| 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 |