Module Name: src
Committed By: simonb
Date: Wed Aug 26 10:51:45 UTC 2020
Modified Files:
src/sys/arch/mips/include: mips_param.h proc.h
Log Message:
Define a UPAGES_MAX constant to size the a md_upte array in MIPS's
struct mdlwp. This is exposed to userland, so we can't use something
based on PAGE_SIZE.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/mips/include/mips_param.h
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/mips/include/proc.h
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/mips_param.h
diff -u src/sys/arch/mips/include/mips_param.h:1.46 src/sys/arch/mips/include/mips_param.h:1.47
--- src/sys/arch/mips/include/mips_param.h:1.46 Sun Aug 23 10:23:38 2020
+++ src/sys/arch/mips/include/mips_param.h Wed Aug 26 10:51:45 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: mips_param.h,v 1.46 2020/08/23 10:23:38 simonb Exp $ */
+/* $NetBSD: mips_param.h,v 1.47 2020/08/26 10:51:45 simonb Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -130,6 +130,7 @@
#define USPACE MAX(__MIN_USPACE, PAGE_SIZE)
#define UPAGES (USPACE / PAGE_SIZE) /* number of pages for u-area */
#define USPACE_ALIGN USPACE /* make sure it starts on a even VA */
+#define UPAGES_MAX 8 /* a (constant) max for userland use */
/*
* Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
Index: src/sys/arch/mips/include/proc.h
diff -u src/sys/arch/mips/include/proc.h:1.30 src/sys/arch/mips/include/proc.h:1.31
--- src/sys/arch/mips/include/proc.h:1.30 Sun Aug 23 10:23:38 2020
+++ src/sys/arch/mips/include/proc.h Wed Aug 26 10:51:45 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: proc.h,v 1.30 2020/08/23 10:23:38 simonb Exp $ */
+/* $NetBSD: proc.h,v 1.31 2020/08/26 10:51:45 simonb Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -52,7 +52,7 @@ struct mdlwp {
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 */
- int md_upte[UPAGES]; /* ptes for mapping u page */
+ int md_upte[UPAGES_MAX]; /* ptes for mapping u page */
};
struct mdproc {