From 9cef742ef3071783a3e9bcc6b53e70b05bef4ea8 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sun, 16 Feb 2014 22:12:13 +0000 Subject: [PATCH] MFC r260914: In pmap_set_pte(), make sure to enforce ordering by inserting a memory fence. --- sys/ia64/ia64/pmap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/ia64/ia64/pmap.c b/sys/ia64/ia64/pmap.c index 49418cd57ffc..7b5eea0653af 100644 --- a/sys/ia64/ia64/pmap.c +++ b/sys/ia64/ia64/pmap.c @@ -1318,6 +1318,8 @@ pmap_set_pte(struct ia64_lpte *pte, vm_offset_t va, vm_offset_t pa, pte->itir = PAGE_SHIFT << 2; + ia64_mf(); + pte->tag = ia64_ttag(va); } @@ -1336,8 +1338,8 @@ pmap_remove_pte(pmap_t pmap, struct ia64_lpte *pte, vm_offset_t va, * First remove from the VHPT. */ error = pmap_remove_vhpt(va); - if (error) - return (error); + KASSERT(error == 0, ("%s: pmap_remove_vhpt returned %d", + __func__, error)); pmap_invalidate_page(va);