-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
kernel: idle: introduce idle enter hook #83760
base: main
Are you sure you want to change the base?
kernel: idle: introduce idle enter hook #83760
Conversation
8f8d5e8
to
ed7327a
Compare
To allow for custom SoC idle behavior, introduce hook executed when idle thread is entered, and add the config CONFIG_IDLE_DEFAULT_ROUTINE to allow excluding the current "default" idle routine. This addition introduces no functional change unless the hook is explicitly enabled, and the default routine explicitly disabled. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
ed7327a
to
d902520
Compare
* This hook is implemented by the SoC and can be used to perform any | ||
* SoC-specific idle enter logic. | ||
*/ | ||
void idle_enter_hook(void); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's SoC specific, maybe clearer and more consistent is
void idle_enter_hook(void); | |
void soc_idle_enter_hook(void); |
config IDLE_DEFAULT_ROUTINE | ||
bool "Execute idle default routine" | ||
default y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any options executed by the default routine should depend on this option, right? e.g. policy stuff
To allow for custom SoC idle behavior, introduce hook executed
when idle thread is entered, and add the config
CONFIG_IDLE_DEFAULT_ROUTINE to allow excluding the current
"default" idle routine.
This addition introduces no functional change unless the hook
is explicitly enabled, and the default routine explicitly
disabled.