From 2ab0645c405f8c5c26cb6972d0636ba3297ea89c Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 30 Oct 2008 22:06:03 +0000 Subject: In cpu_switchto(), always pmap_deactivate() the process being switched out, even in non-MP kernels, to avoid unnecessary tlb flushes later when pmap operates on shared pages. --- sys/arch/m88k/m88k/process.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/arch/m88k') diff --git a/sys/arch/m88k/m88k/process.S b/sys/arch/m88k/m88k/process.S index 831ca99a1fb..efa180bbee0 100644 --- a/sys/arch/m88k/m88k/process.S +++ b/sys/arch/m88k/m88k/process.S @@ -1,4 +1,4 @@ -/* $OpenBSD: process.S,v 1.21 2007/11/06 21:44:39 miod Exp $ */ +/* $OpenBSD: process.S,v 1.22 2008/10/30 22:06:02 miod Exp $ */ /* * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -40,6 +40,8 @@ * * Switch context from oldproc to newproc. oldproc may be NULL if there is * no need to save the current context. + * + * Note that this code assumes that oldproc == curproc if not NULL. */ ENTRY(cpu_switchto) /* @@ -53,11 +55,9 @@ ENTRY(cpu_switchto) bsr _ASM_LABEL(__savectx) /* note that we don't need to recover r1 at this point */ -#ifdef MULTIPROCESSOR ldcr r11, CPU bsr.n _C_LABEL(pmap_deactivate) /* pmap_deactivate(oldproc) */ ld r2, r11, CI_CURPROC -#endif 1: ldcr r2, PSR -- cgit v1.2.3