Module Name: src Committed By: matt Date: Wed Feb 24 00:30:21 UTC 2010
Modified Files: src/sys/arch/mips/mips [matt-nb5-mips64]: pmap_tlb.c Log Message: When adding a CPU to a TLB, mark the kernel pmap as "active" and "onproc" for that CPU. To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/mips/pmap_tlb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/mips/pmap_tlb.c diff -u src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.2 src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.3 --- src/sys/arch/mips/mips/pmap_tlb.c:1.1.2.2 Tue Feb 23 20:33:48 2010 +++ src/sys/arch/mips/mips/pmap_tlb.c Wed Feb 24 00:30:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_tlb.c,v 1.1.2.2 2010/02/23 20:33:48 matt Exp $ */ +/* $NetBSD: pmap_tlb.c,v 1.1.2.3 2010/02/24 00:30:21 matt Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.1.2.2 2010/02/23 20:33:48 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.1.2.3 2010/02/24 00:30:21 matt Exp $"); /* * Manages address spaces in a TLB. @@ -124,6 +124,7 @@ #include <sys/proc.h> #include <sys/mutex.h> #include <sys/atomic.h> +#include <sys/kernel.h> /* for cold */ #include <sys/cpu.h> #include <uvm/uvm.h> @@ -225,11 +226,18 @@ { KASSERT(!CPU_IS_PRIMARY(ci)); KASSERT(ci->ci_data.cpu_idlelwp != NULL); + KASSERT(cold); TLBINFO_LOCK(ti); - ti->ti_cpu_mask |= 1 << cpu_index(ci); + uint32_t cpu_mask = 1 << cpu_index(ci); + ti->ti_cpu_mask |= cpu_mask; ci->ci_tlb_info = ti; ci->ci_ksp_tlb_slot = ti->ti_wired++; + /* + * Mark the kernel as active and "onproc" for this cpu. + */ + pmap_kernel()->pm_active |= cpu_mask; + pmap_kernel()->pm_onproc |= cpu_mask; TLBINFO_UNLOCK(ti); } #endif /* MULTIPROCESSOR */