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 Deal with uarea mapped in either kseg0 or...
details: https://anonhg.NetBSD.org/src/rev/3c6a5191ceb9
branches: trunk
changeset: 764646:3c6a5191ceb9
user: matt <matt%NetBSD.org@localhost>
date: Fri Apr 29 22:07:46 2011 +0000
description:
Deal with uarea mapped in either kseg0 or xkphys.
diffstat:
sys/arch/mips/mips/vm_machdep.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diffs (42 lines):
diff -r 21e94bff2b77 -r 3c6a5191ceb9 sys/arch/mips/mips/vm_machdep.c
--- a/sys/arch/mips/mips/vm_machdep.c Fri Apr 29 22:06:43 2011 +0000
+++ b/sys/arch/mips/mips/vm_machdep.c Fri Apr 29 22:07:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.136 2011/02/20 07:45:48 matt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.137 2011/04/29 22:07:46 matt Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.136 2011/02/20 07:45:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.137 2011/04/29 22:07:46 matt Exp $");
#include "opt_ddb.h"
#include "opt_coredump.h"
@@ -120,17 +120,16 @@
l2->l_md.md_utf = tf;
#if USPACE > PAGE_SIZE
+ bool direct_mapped_p = MIPS_KSEG0_P(ua2);
#ifdef _LP64
- if (!MIPS_XKPHYS_P(ua2))
-#else
- if (!MIPS_KSEG0_P(ua2))
+ direct_mapped_p = direct_mapped_p || MIPS_XKPHYS_P(ua2);
#endif
- {
- const int x = (MIPS_HAS_R4K_MMU) ?
+ if (!direct_mapped_p) {
+ pt_entry_t * const pte = kvtopte(ua2);
+ const uint32_t x = (MIPS_HAS_R4K_MMU) ?
(MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) : MIPS1_PG_G;
- pt_entry_t *pte = kvtopte(ua2);
- for (size_t i = 0; i < UPAGES; i++) {
+ for (u_int i = 0; i < UPAGES; i++) {
l2->l_md.md_upte[i] = pte[i].pt_entry &~ x;
}
}
Home |
Main Index |
Thread Index |
Old Index