Use memory barriers defined by xen headers#28
Open
ydirson wants to merge 1 commit intoxapi-project:masterfrom
Open
Use memory barriers defined by xen headers#28ydirson wants to merge 1 commit intoxapi-project:masterfrom
ydirson wants to merge 1 commit intoxapi-project:masterfrom
Conversation
This gives us the necessary definitions for arm64. Those live in xen-barrier.h starting with 4.20, but we won't be able to use it for some time. Before this they live in xenctrl.h, but it pulls too much stuff. So this is a sync with the 4.20 headers contents. Since the code only uses mb, and no [rw]mb, the latter are not imported. The original macro name from the Xen header is preserved for easier future synchro, so this adjusts the callsites accordingly. Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
| * back to those provided by the kernel */ | ||
| /* from <xen-barrier.h> in 4.20.0 */ | ||
|
|
||
| #define xen_barrier() asm volatile ( "" : : : "memory") |
Collaborator
There was a problem hiding this comment.
Why is this added if it is not used?
Having said that, I think it might be preferable to simply include a copy of xen-barrier.h and #include it. It would be easier to keep up-to-date and mean less tat in this file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This gives us the necessary definitions for arm64.
Those live in xen-barrier.h starting with 4.20, but we won't be able to use it for some time. Before this they live in xenctrl.h, but it pulls too much stuff. So this is a sync with the 4.20 headers contents.
Since the code only uses mb, and no [rw]mb, the latter are not imported. The original macro name from the Xen header is preserved for easier future synchro, so this adjusts the callsites accordingly.