Support setting the platform profile #517
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See commit messages for more details.
This adds support for setting the platform profile via
/sys/firmware/acpi/platform_profile
. It behaves very similarly to the governor, but with just one file.Note that setting the platform profile may change other options (like the governor) and prevent them from being altered further. Thus, this also necessitates a small refactor where the initial values are stored before any changes.
The tests for platform profile treat it as required (set the status to
-1
if they fail). However, I'm not sure whether this should be the case, as I don't know how common this feature is yet.My nitpicking also got the best of me, so I extracted split lock mitigation stuff into
common-splitlock.c
. For now, this really only matters for the path, but, in theory,procsysctl
could be altered to also allow getting the split lock mitigation state, rather than just setting it. Please let me know if this change is undesired, as I can just remove the last commit if so.Closes #516