Skip to content

Conversation

@ydirson
Copy link

@ydirson ydirson commented Oct 30, 2025

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.

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")
Copy link
Collaborator

@rosslagerwall rosslagerwall Oct 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants