summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2020-07-30 12:52:55 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2020-07-30 12:52:55 +0000
commit93bc75d37d0a7332de5573d7b6b658ff59008e29 (patch)
tree0c2e29b215c79f77d3024c71bbabdc877cea5a9d /sys
parent030834654f62cd8ab6c4d805e9ac2387c9d354f9 (diff)
Only invalidate "user" SLB entry if it is currently set.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/powerpc64/powerpc64/pmap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/arch/powerpc64/powerpc64/pmap.c b/sys/arch/powerpc64/powerpc64/pmap.c
index a0b3f18e052..e929306e33e 100644
--- a/sys/arch/powerpc64/powerpc64/pmap.c
+++ b/sys/arch/powerpc64/powerpc64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.38 2020/07/25 10:11:38 kettenis Exp $ */
+/* $OpenBSD: pmap.c,v 1.39 2020/07/30 12:52:54 kettenis Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
@@ -455,10 +455,12 @@ pmap_unset_user_slb(void)
curpcb->pcb_userva = 0;
- isync();
- slbie(ci->ci_kernel_slb[31].slb_slbe);
- isync();
-
+ if (ci->ci_kernel_slb[31].slb_slbe != 0) {
+ isync();
+ slbie(ci->ci_kernel_slb[31].slb_slbe);
+ isync();
+ }
+
ci->ci_kernel_slb[31].slb_slbe = 0;
ci->ci_kernel_slb[31].slb_slbv = 0;
}