summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPatrick Wildt <patrick@cvs.openbsd.org>2017-01-21 09:23:20 +0000
committerPatrick Wildt <patrick@cvs.openbsd.org>2017-01-21 09:23:20 +0000
commit48be71b5f29f221dd2a371a5d3c806d85b14b31e (patch)
treeb81881ab7cc0ffdddca970d5f77e263fced1facb /sys
parent42be79b9c7de3f0b600e6eeccc68549af9ddc8e6 (diff)
Only switch the pagetable if we were asked to switch to a user
process. This seems to happen when we switch away from a proc to kill it. We should probably start keeping a 'dummy' table around.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/arm64/arm64/pmap.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/arm64/arm64/pmap.c b/sys/arch/arm64/arm64/pmap.c
index b1a23309704..77e6f189240 100644
--- a/sys/arch/arm64/arm64/pmap.c
+++ b/sys/arch/arm64/arm64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.9 2017/01/14 00:32:34 jsg Exp $ */
+/* $OpenBSD: pmap.c,v 1.10 2017/01/21 09:23:19 patrick Exp $ */
/*
* Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com>
*
@@ -2379,7 +2379,10 @@ pmap_setttb(struct proc *p, paddr_t pagedir, struct pcb *pcb)
}
//printf("switching userland to %p %p asid %d new asid %d\n",
// pm, pmap_kernel(), oasid, pm->pm_asid);
- }
- __asm volatile ("msr ttbr0_el1, %x0" :: "r"(pagedir));
+ __asm volatile("msr ttbr0_el1, %x0" :: "r"(pagedir));
+ __asm volatile("dsb sy");
+ } else {
+ // XXX what to do if switching to kernel pmap !?!?
+ }
}