-
Notifications
You must be signed in to change notification settings - Fork 20
Feat power button #351
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
Feat power button #351
Conversation
2aa4248 to
e98fd0c
Compare
114c5ad to
405cb93
Compare
|
I have removed the spinlock changes. I have added another commit that adds a |
405cb93 to
9b2fae1
Compare
minipli-oss
left a comment
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.
Otherwise LGTM!
9b2fae1 to
9301e05
Compare
Driver for ACPI fixed power buttons. It allows overwriting the default handler so the button can be used for custom purposes. One such purpose might be to trigger an experiment to run. Signed-off-by: Sandro Rüegge <rueegges@ethz.ch>
Adding a self reference to the percpu allows checking what CPU some code is currently running on. We use this in pb_set_handler to ensure it runs on the bsp.
Signed-off-by: Sandro Rüegge <rueegges@ethz.ch>
9301e05 to
a3441a4
Compare
minipli-oss
left a comment
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.
LGTM!
Thanks, @sparchatus!
Add support for ACPI fixed power buttons. This is based on #350
I wanted to add the functionality to change the power button handler because it would be useful for triggering experiments for me. This opened up a race condition between the interrupt and the function changing the handler. The interrupt may not wait for a spinlock so I added a try_lock function but I am not very convinced by this approach.