[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/4] xen/common: Replace incorrect mandatory barriers with SMP barriers
On Mon, 5 Dec 2016, Andrew Cooper wrote: > 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@xxxxxxxxxx> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> > CC: Jan Beulich <JBeulich@xxxxxxxx> > CC: Stefano Stabellini <sstabellini@xxxxxxxxxx> > CC: Julien Grall <julien.grall@xxxxxxx> > > Restricting to just the $ARCH maintainers, as this is a project-wide sweep > --- > xen/common/grant_table.c | 2 +- > xen/common/time.c | 4 ++-- > xen/common/vm_event.c | 6 +++--- > 3 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/xen/common/grant_table.c b/xen/common/grant_table.c > index e2c4097..a425a9e 100644 > --- a/xen/common/grant_table.c > +++ b/xen/common/grant_table.c > @@ -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 ) > diff --git a/xen/common/time.c b/xen/common/time.c > index 721ada8..a7caea9 100644 > --- a/xen/common/time.c > +++ b/xen/common/time.c > @@ -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); > diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c > index 907ab40..c6f7d32 100644 > --- a/xen/common/vm_event.c > +++ b/xen/common/vm_event.c > @@ -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) > -- > 2.1.4 > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |