-
Notifications
You must be signed in to change notification settings - Fork 7.3k
pm: Use fixed cpu id in single core case #88144
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
Conversation
5220f6c
to
518fa5d
Compare
Could ROM savings be obtained across other users in the codebase?
|
518fa5d
to
0ce6110
Compare
0ce6110
to
411d291
Compare
Added |
411d291
to
b4b2b9e
Compare
In case of a single core it resolves to 0. In many cases it reduces code size and execution time compared to reading id in runtime. Signed-off-by: Krzysztof Chruściński <[email protected]>
When there are no multiple cores than fixing id to 0 saves few cycles. Signed-off-by: Krzysztof Chruściński <[email protected]>
b4b2b9e
to
d32d51b
Compare
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.
Nice!
Driver is using local macro to get current CPU ID and it is now in conflict with generic CPU_ID. Added prefix to avoid conflict. Signed-off-by: Krzysztof Chruściński <[email protected]>
When there are no multiple cores than fixing id to 0 saves few cycles.
Do not call ticks_expiring_sooner if not needed.
This small improvement saves few cycles but surprisingly significantly reduces
pm.c
code size 416 to 316 bytes in the sample that I've checked.