From b12649ce9e7a162dae386d32bd04c5fdc537d65c Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 4 Jul 2013 10:32:44 +0200 Subject: 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 Acked-by: Keir Fraser --- xen/xsm/flask/ss/sidtab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xen/xsm') diff --git a/xen/xsm/flask/ss/sidtab.c b/xen/xsm/flask/ss/sidtab.c index 586033cfe1..cd1360cb4a 100644 --- a/xen/xsm/flask/ss/sidtab.c +++ b/xen/xsm/flask/ss/sidtab.c @@ -79,13 +79,13 @@ int sidtab_insert(struct sidtab *s, u32 sid, struct context *context) if ( prev ) { newnode->next = prev->next; - wmb(); + smp_wmb(); prev->next = newnode; } else { newnode->next = s->htable[hvalue]; - wmb(); + smp_wmb(); s->htable[hvalue] = newnode; } -- cgit v1.2.3