Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips Fix a bug with pmap_remove_all and pmap_d...
details: https://anonhg.NetBSD.org/src/rev/3dc8c2bd27b5
branches: trunk
changeset: 763876:3dc8c2bd27b5
user: matt <matt%NetBSD.org@localhost>
date: Wed Apr 06 05:35:37 2011 +0000
description:
Fix a bug with pmap_remove_all and pmap_deactivate. Should prevent any
pmap_activate from allocating an ASID while doing pmap_remove_all XXX.
diffstat:
sys/arch/mips/mips/pmap_tlb.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 945ca4bb78ca -r 3dc8c2bd27b5 sys/arch/mips/mips/pmap_tlb.c
--- a/sys/arch/mips/mips/pmap_tlb.c Wed Apr 06 05:33:07 2011 +0000
+++ b/sys/arch/mips/mips/pmap_tlb.c Wed Apr 06 05:35:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap_tlb.c,v 1.3 2011/03/15 07:32:53 matt Exp $ */
+/* $NetBSD: pmap_tlb.c,v 1.4 2011/04/06 05:35:37 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.3 2011/03/15 07:32:53 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_tlb.c,v 1.4 2011/04/06 05:35:37 matt Exp $");
/*
* Manages address spaces in a TLB.
@@ -806,9 +806,11 @@
#ifdef MULTIPROCESSOR
/*
* The kernel pmap is aways onproc and active and must never have
- * those bits cleared.
+ * those bits cleared. If pmap_remove_all was called, it has already
+ * deactivated the pmap and thusly onproc will be 0 so there's nothing
+ * to do.
*/
- if (pm != pmap_kernel()) {
+ if (pm != pmap_kernel() && pm->pm_onproc != 0) {
struct cpu_info * const ci = curcpu();
struct pmap_tlb_info * const ti = ci->ci_tlb_info;
const uint32_t cpu_mask = 1 << cpu_index(ci);
Home |
Main Index |
Thread Index |
Old Index