summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/slb.c
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2012-04-28 00:12:23 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2012-04-28 00:12:23 +0000
commitd4577289f5bcc75fd682e6b0410353b3cde2e447 (patch)
tree3102db284eeaec1b26f9d14e15593c1e106f24e2 /sys/powerpc/aim/slb.c
parentefc4ec38135cb9d6f07e84cf00a8423288397c4a (diff)
downloadFreeBSD-src-d4577289f5bcc75fd682e6b0410353b3cde2e447.zip
FreeBSD-src-d4577289f5bcc75fd682e6b0410353b3cde2e447.tar.gz
After switching mutexes to use lwsync, they no longer provide sufficient
guarantees on acquire for the tlbie mutex. Conversely, the TLB invalidation sequence provides guarantees that do not need to be redundantly applied on release. Roll a small custom lock that is just right. Simultaneously, convert the SLB tree changes back to lwsync, as changing them to sync was a misdiagnosis of the tlbie barrier problem this commit actually fixes.
Diffstat (limited to 'sys/powerpc/aim/slb.c')
-rw-r--r--sys/powerpc/aim/slb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/aim/slb.c b/sys/powerpc/aim/slb.c
index 7f4b2ef..162c7fb 100644
--- a/sys/powerpc/aim/slb.c
+++ b/sys/powerpc/aim/slb.c
@@ -139,7 +139,7 @@ make_new_leaf(uint64_t esid, uint64_t slbv, struct slbtnode *parent)
* that a lockless searcher always sees a valid path through
* the tree.
*/
- powerpc_sync();
+ mb();
idx = esid2idx(esid, parent->ua_level);
parent->u.ua_child[idx] = child;
@@ -187,7 +187,7 @@ make_intermediate(uint64_t esid, struct slbtnode *parent)
idx = esid2idx(child->ua_base, inter->ua_level);
inter->u.ua_child[idx] = child;
setbit(&inter->ua_alloc, idx);
- powerpc_sync();
+ mb();
/* Set up parent to point to intermediate node ... */
idx = esid2idx(inter->ua_base, parent->ua_level);
OpenPOWER on IntegriCloud