-
Notifications
You must be signed in to change notification settings - Fork 8.2k
kconfig: Change how BT affects SYSTEM_WORKQUEUE_PRIORITY #8377
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
kconfig: Change how BT affects SYSTEM_WORKQUEUE_PRIORITY #8377
Conversation
|
This patch is in a similar vein to #8338 |
kernel/Kconfig
Outdated
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.
Accidental spaces instead of tabs.
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.
Fixed
|
Testing shows that it still defaults to -1 for BT samples and that trying to set it to a non-negative number errors-out at Kconfig as desired: |
8386708 to
47d02d5
Compare
kernel/Kconfig
Outdated
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.
This default is outside the range and will get clamped to -1.
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.
Oh, wait, there's an if BT on the range. Maybe this can't apply in that case.
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.
I imagine that BT implies COOP_ENABLED because there was an assertion on this value being negative in BT (So this is safe).
ulfalizer
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.
Alright, as long as the default 0 and the range can't apply at the same time, this should be safe.
Codecov Report
@@ Coverage Diff @@
## master #8377 +/- ##
=======================================
Coverage 64.61% 64.61%
=======================================
Files 423 423
Lines 40293 40293
Branches 6801 6801
=======================================
Hits 26034 26034
Misses 11126 11126
Partials 3133 3133Continue to review full report at Codecov.
|
nashif
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.
I dislike having Bluetooth dependencies in the Kernel Kconfig. I need to be able to use the kernel standalone without pulling Bluetooth code or Kconfigs. Lets not have cross-pollution of kernel and subsystem configurations.
Invalid configurations should be detected during configuration instead of during compilation whenever possible. This patch replaces a BUILD_ASSERT on CONFIG_SYSTEM_WORKQUEUE_PRIORITY with what is intended to be an equivalent Kconfig restriction. Signed-off-by: Sebastian Bøe <[email protected]>
47d02d5 to
cca1ca7
Compare
I agree. It is now re-written to have BT declare their kernel requirements, instead of the kernel configuring itself based on it's users requirements. |
|
There is actually same requirement for networking code. Also for networking, the main thread priority (CONFIG_MAIN_THREAD_PRIORITY) should be COOP (so < 0). I can prepare a patch for that. |
Invalid configurations should be detected during configuration instead
of during compilation whenever possible.
This patch replaces a BUILD_ASSERT on CONFIG_SYSTEM_WORKQUEUE_PRIORITY
with what is intended to be an equivalent Kconfig restriction.
Signed-off-by: Sebastian Bøe [email protected]