mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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:
1 parent
2a854e414f
commit
ea33d31b0c
3 files changed
+6
-6
No files matched your search
@@ -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
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||