svn commit: r271998 - stable/10/sys/ia64/ia64
Marcel Moolenaar
marcel at FreeBSD.org
Mon Sep 22 20:10:46 UTC 2014
Author: marcel
Date: Mon Sep 22 20:10:45 2014
New Revision: 271998
URL: http://svnweb.freebsd.org/changeset/base/271998
Log:
Make sure all memory updates are made visible before we let go
of the thread in cpu_switch(). It's otherwise possible that on
another CPU the thread continues from stale context data.
Note that this is prominent on newer CPUs, like the Montecito,
that really take advantage of the weak memory ordering. First
generation Itanium 2 is not that aggressive and does not need
this.
This is a direct commit to stable/10.
Approved by: re@ (gjb)
Modified:
stable/10/sys/ia64/ia64/machdep.c
Modified: stable/10/sys/ia64/ia64/machdep.c
==============================================================================
--- stable/10/sys/ia64/ia64/machdep.c Mon Sep 22 20:04:59 2014 (r271997)
+++ stable/10/sys/ia64/ia64/machdep.c Mon Sep 22 20:10:45 2014 (r271998)
@@ -465,6 +465,8 @@ cpu_switch(struct thread *old, struct th
oldpcb->pcb_current_pmap =
pmap_switch(newpcb->pcb_current_pmap);
+ ia64_mf();
+
atomic_store_rel_ptr(&old->td_lock, mtx);
#if defined(SCHED_ULE) && defined(SMP)
More information about the svn-src-stable-10
mailing list