Skip to content

Conversation

@DhruvaG2000
Copy link
Collaborator

Document all about s2idle and PSCI and how the whole stack helps us in selecting between low power modes on the TI AM62L

@DhruvaG2000 DhruvaG2000 changed the title feat(linux): Add s2idle docs [WIP][DNM] Add s2idle docs Dec 8, 2025
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

New warnings found with rstcheck:

source/linux/Foundational_Components/Power_Management/pm_psci_s2idle.rst:25: (ERROR/3) Unexpected indentation.

* **System State:** (Optional) Power Down or Retention
4. **PSCI Enforcement:** The PSCI implementation verifies that all other cores in the requested node are indeed idle. If they are not, the request is denied (to prevent race conditions).

*************************************
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section identifier line should be of equal length to the section name.

Suspend-to-Idle (s2idle), also known as "freeze," is a generic, pure software, light-weight variant of system suspend.
In this state, the Linux kernel freezes user space tasks, suspends devices, and then puts all CPUs into their deepest available idle state.

**********************
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section identifier line should be of equal length to the section name.


**************************
OS Initiated (OSI) Mode
**************************
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The section identifier line should be of equal length to the section name.

@DhruvaG2000
Copy link
Collaborator Author

@cshilwant , and rest I'll mark the PR ready for review once it has undergone LPM team internal review. Till then requesting you to hold off reviews.
This is going to be a major documentation update for AM62L PM story hence might take some time to get reviews and complete.

Thanks!

On ARM64 platforms, both ``s2idle`` and ``deep`` states can achieve similar power savings (e.g., suspending to RAM / DDR Self-Refresh).
The primary differences lie in the software execution flow, specifically how CPUs are managed and which PSCI APIs are invoked.

.. list-table:: S2Idle vs Deep Sleep (ARM64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to specify ARM64 platforms since you already specified ARM64 previously and this page will (presumably) only be used in ARM64 platforms?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, willfix

- **Offlined**: Non-boot CPUs are hot-unplugged (removed) from the system via ``CPU_OFF``.

* - **Entry Path**
- **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **cpuidle**: Uses the standard CPU idle framework and governance. It runtime suspends each driver to make sure it's idle.
- **cpuidle**: Uses the standard CPU idle framework and governance. Each driver is put into an idle state by runtime suspend.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, willfix

In this state, the Linux kernel freezes user space tasks, suspends devices, and then puts all CPUs into their deepest available idle state.

**********************************
S2Idle vs Deep Sleep (mem)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if this whole section should be moved to be the last / one of the last sections? I think explaining PSCI would be good to do before going into comparisons on how it operates differently than Deep Sleep

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

5. Thaw tasks

The `cpuidle` driver calls the PSCI `CPU_SUSPEND` API to transition the CPU (and potentially
higher-level topology nodes like clusters) into a low-power state. The effectiveness of s2idle
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume the reader doesn't know what the topology nodes / clusters are. This should either be explained or the information in the parenthesis should be removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok since we will need more docs on how we're grouping things and what is cluster/ system definition I will send it in next PR. removing for now

2. Suspend devices
|
v
3. cpuidle driver -----------> CPU_SUSPEND (SMC/HVC)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is SMC/HVC?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok will add explanation for secure monitor call.

Comment on lines 83 to 84
| Enter low-power
| hardware state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| Enter low-power
| hardware state
| CPU enters low-power
| hardware state

Only suggesting this because I think the cpuidle to PSCI firmware can be a little confusing.

@github-actions
Copy link

New warnings found with rstcheck:

source/linux/Foundational_Components/Power_Management/pm_psci_s2idle.rst:48: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.
source/linux/Foundational_Components/Power_Management/pm_psci_s2idle.rst:29: (ERROR/3) Error parsing content block for the "list-table" directive: two-level bullet list expected, but row 4 does not contain a second-level bullet list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants