xen/common: Replace incorrect mandatory barriers with SMP barriers

Mandatory barriers are only for use with reduced-cacheability MMIO mappings.

All of these uses are just to deal with shared memory between multiple
processors, so use the smp_*() which are the correct barriers for the purpose.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
This commit is contained in:
Andrew Cooper committed 2016-12-07 10:02:37 +00:00
1 parent 2a854e414f
commit ea33d31b0c
3 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -993,7 +993,7 @@ __gnttab_map_grant_ref(
mt = &maptrack_entry(lgt, handle);
mt->domid = op->dom;
mt->ref = op->ref;
wmb();
smp_wmb();
write_atomic(&mt->flags, op->flags);
if ( need_iommu )
+2 -2
View File
@@ -103,7 +103,7 @@ void update_domain_wallclock_time(struct domain *d)
wc_version = &shared_info(d, wc_version);
*wc_version = version_update_begin(*wc_version);
wmb();
smp_wmb();
sec = wc_sec + d->time_offset_seconds;
shared_info(d, wc_sec) = sec;
@@ -117,7 +117,7 @@ void update_domain_wallclock_time(struct domain *d)
shared_info(d, wc_sec_hi) = sec >> 32;
#endif
wmb();
smp_wmb();
*wc_version = version_update_end(*wc_version);
spin_unlock(&wc_lock);
+3 -3
View File
@@ -31,9 +31,9 @@
#include <xsm/xsm.h>
/* for public/io/ring.h macros */
#define xen_mb() mb()
#define xen_rmb() rmb()
#define xen_wmb() wmb()
#define xen_mb() smp_mb()
#define xen_rmb() smp_rmb()
#define xen_wmb() smp_wmb()
#define vm_event_ring_lock_init(_ved) spin_lock_init(&(_ved)->ring_lock)
#define vm_event_ring_lock(_ved) spin_lock(&(_ved)->ring_lock)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.