summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-04-19 18:12:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-04-19 18:12:41 +0000
commitccc76718800f8a436c5e9b2d1d9a42336d9ffe05 (patch)
tree521f954558bbbec0dcd4bb291c27eaa36f23c3bd /sys/arch
parent33c8d44b3b0588154af50a728041c80637518975 (diff)
Be sure to update the currently active ASID in pmap_activate() if invoked on
behalf of curproc.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/pmap.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/pmap.c b/sys/arch/mips64/mips64/pmap.c
index 073fbec6d1f..8ef94263b94 100644
--- a/sys/arch/mips64/mips64/pmap.c
+++ b/sys/arch/mips64/mips64/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.58 2012/04/06 20:11:18 miod Exp $ */
+/* $OpenBSD: pmap.c,v 1.59 2012/04/19 18:12:40 miod Exp $ */
/*
* Copyright (c) 2001-2004 Opsycon AB (www.opsycon.se / www.opsycon.com)
@@ -600,10 +600,13 @@ pmap_activate(struct proc *p)
{
pmap_t pmap = p->p_vmspace->vm_map.pmap;
struct cpu_info *ci = curcpu();
+ uint id;
ci->ci_curpmap = pmap;
p->p_addr->u_pcb.pcb_segtab = pmap->pm_segtab;
- pmap_alloc_tlbpid(p);
+ id = pmap_alloc_tlbpid(p);
+ if (p == ci->ci_curproc)
+ tlb_set_pid(id);
}
/*