Fix abd_enter/exit_critical wrappers #10332
Merged
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.
Motivation and Context
When loading the kernel modules the follow warning is printed if the
CONFIG_DEBUG_ATOMIC_SLEEP
kernel debug option is enabled.Description
Commit fc551d7 introduced the wrappers
abd_enter_critical()
andabd_exit_critical()
to mark critical sections. On Linux these areimplemented with the
local_irq_save()
andlocal_irq_restore()
macroswhich set the 'flags' argument when saving. By wrapping them with
a function the local variable is no longer set by the macro and is
no longer properly restored.
Convert
abd_enter_critical()
andabd_exit_critical()
to macros toresolve this issue and ensure the flags are properly restored.
How Has This Been Tested?
The warning is no longer printed to the console on module load
when this change is applied.
Types of changes
Checklist:
Signed-off-by
.