summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/pmap.c5
-rw-r--r--sys/i386/i386/pmap.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index e60ff0f..3f8981e 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -1810,7 +1810,10 @@ retry:
if (pbits != obits) {
if (!atomic_cmpset_long(pte, obits, pbits))
goto retry;
- anychanged = 1;
+ if (obits & PG_G)
+ pmap_invalidate_page(pmap, sva);
+ else
+ anychanged = 1;
}
}
}
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index 5a60cb0..97020e2 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -1842,7 +1842,10 @@ retry:
if (!atomic_cmpset_int((u_int *)pte, obits,
pbits))
goto retry;
- anychanged = 1;
+ if (obits & PG_G)
+ pmap_invalidate_page(pmap, sva);
+ else
+ anychanged = 1;
}
}
}
OpenPOWER on IntegriCloud