Module Name: src
Committed By: matt
Date: Mon Aug 17 18:56:10 UTC 2009
Modified Files:
src/sys/arch/mips/include: proc.h
src/sys/arch/mips/mips: vm_machdep.c
Log Message:
Only include md_uptes if USPACE > PAGE_SIZE
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/mips/include/proc.h
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/mips/mips/vm_machdep.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/include/proc.h
diff -u src/sys/arch/mips/include/proc.h:1.21 src/sys/arch/mips/include/proc.h:1.22
--- src/sys/arch/mips/include/proc.h:1.21 Fri Nov 16 07:36:11 2007
+++ src/sys/arch/mips/include/proc.h Mon Aug 17 18:56:09 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.21 2007/11/16 07:36:11 skrll Exp $ */
+/* $NetBSD: proc.h,v 1.22 2009/08/17 18:56:09 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -48,10 +48,12 @@
struct mdlwp {
void *md_regs; /* registers on current frame */
int md_flags; /* machine-dependent flags */
- int md_upte[UPAGES]; /* ptes for mapping u page */
vaddr_t md_ss_addr; /* single step address for ptrace */
int md_ss_instr; /* single step instruction for ptrace */
volatile int md_astpending; /* AST pending on return to userland */
+#if USPACE > PAGE_SIZE
+ int md_upte[UPAGES]; /* ptes for mapping u page */
+#endif
};
struct mdproc {
Index: src/sys/arch/mips/mips/vm_machdep.c
diff -u src/sys/arch/mips/mips/vm_machdep.c:1.123 src/sys/arch/mips/mips/vm_machdep.c:1.124
--- src/sys/arch/mips/mips/vm_machdep.c:1.123 Sat May 30 18:26:06 2009
+++ src/sys/arch/mips/mips/vm_machdep.c Mon Aug 17 18:56:10 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.123 2009/05/30 18:26:06 martin Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.124 2009/08/17 18:56:10 matt Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.123 2009/05/30 18:26:06 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.124 2009/08/17 18:56:10 matt Exp $");
#include "opt_ddb.h"
@@ -128,8 +128,6 @@
{
struct pcb *pcb;
struct frame *f;
- pt_entry_t *pte;
- int i, x;
l2->l_md.md_ss_addr = 0;
l2->l_md.md_ss_instr = 0;
@@ -162,12 +160,17 @@
l2->l_md.md_regs = (void *)f;
l2->l_md.md_flags = l1->l_md.md_flags & MDP_FPUSED;
- x = (MIPS_HAS_R4K_MMU) ?
- (MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) :
- MIPS1_PG_G;
- pte = kvtopte(l2->l_addr);
- for (i = 0; i < UPAGES; i++)
- l2->l_md.md_upte[i] = pte[i].pt_entry &~ x;
+#if USPACE > PAGE_SIZE
+ {
+ size_t i;
+ const int x = (MIPS_HAS_R4K_MMU) ?
+ (MIPS3_PG_G | MIPS3_PG_RO | MIPS3_PG_WIRED) :
+ MIPS1_PG_G;
+ pt_entry_t *pte = kvtopte(l2->l_addr);
+ for (i = 0; i < UPAGES; i++)
+ l2->l_md.md_upte[i] = pte[i].pt_entry &~ x;
+ }
+#endif
pcb = &l2->l_addr->u_pcb;
pcb->pcb_context[0] = (intptr_t)func; /* S0 */