aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/event.h
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2013-07-04 10:32:44 +0200
committerJan Beulich <jbeulich@suse.com>2013-07-04 10:32:44 +0200
commitb12649ce9e7a162dae386d32bd04c5fdc537d65c (patch)
tree7292f884076246fa3927ecea73b25c8116fb2355 /xen/include/xen/event.h
parentb0581b9214d2359207f836f4f075e978527b9a7b (diff)
downloadxen-b12649ce9e7a162dae386d32bd04c5fdc537d65c.tar.gz
xen-b12649ce9e7a162dae386d32bd04c5fdc537d65c.tar.bz2
xen-b12649ce9e7a162dae386d32bd04c5fdc537d65c.zip
use SMP barrier in common code dealing with shared memory protocols
Xen currently makes no strong distinction between the SMP barriers (smp_mb etc) and the regular barrier (mb etc). In Linux, where we inherited these names from having imported Linux code which uses them, the SMP barriers are intended to be sufficient for implementing shared-memory protocols between processors in an SMP system while the standard barriers are useful for MMIO etc. On x86 with the stronger ordering model there is not much practical difference here but ARM has weaker barriers available which are suitable for use as SMP barriers. Therefore ensure that common code uses the SMP barriers when that is all which is required. On both ARM and x86 both types of barrier are currently identical so there is no actual change. A future patch will change smp_mb to a weaker barrier on ARM. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/event.h')
-rw-r--r--xen/include/xen/event.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h
index 4ac39ad5ee..6f6016285d 100644
--- a/xen/include/xen/event.h
+++ b/xen/include/xen/event.h
@@ -85,7 +85,7 @@ void notify_via_xen_event_channel(struct domain *ld, int lport);
if ( condition ) \
break; \
set_bit(_VPF_blocked_in_xen, &current->pause_flags); \
- mb(); /* set blocked status /then/ re-evaluate condition */ \
+ smp_mb(); /* set blocked status /then/ re-evaluate condition */ \
if ( condition ) \
{ \
clear_bit(_VPF_blocked_in_xen, &current->pause_flags); \
@@ -99,7 +99,7 @@ void notify_via_xen_event_channel(struct domain *ld, int lport);
do { \
set_bit(_VPF_blocked_in_xen, &current->pause_flags); \
raise_softirq(SCHEDULE_SOFTIRQ); \
- mb(); /* set blocked status /then/ caller does his work */ \
+ smp_mb(); /* set blocked status /then/ caller does his work */ \
} while ( 0 )
#endif /* __XEN_EVENT_H__ */