Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch: arm: cortex_m: pm_s2ram: fix system_off rv as rv of s2ram_suspend #80642

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion arch/arm/core/cortex_m/pm_s2ram.S
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,19 @@ SECTION_FUNC(TEXT, arch_pm_s2ram_suspend)
* not successful (in r0 the return value).
*/

/* Move return value of system_off to callee-saved register. */
mov r4, r0

/*
* Reset the marking of suspend to RAM, return is ignored.
*/
mov r1, lr
bl pm_s2ram_mark_check_and_clear
mov lr, r1

/* Move system_off back to r0 as return value */
/* Move the stored return value of system_off back to r0,
* setting it as return value for this function.
*/
Comment on lines +98 to +100
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit:

Suggested change
/* Move the stored return value of system_off back to r0,
* setting it as return value for this function.
*/
/*
* Move the stored return value of system_off back to r0,
* setting it as return value for this function.
*/

mov r0, r4

pop {r4-r12, lr}
Expand Down
Loading