Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/include Define a UPAGES_MAX constant to size t...
details: https://anonhg.NetBSD.org/src/rev/07a83893ddec
branches: trunk
changeset: 937764:07a83893ddec
user: simonb <simonb%NetBSD.org@localhost>
date: Wed Aug 26 10:51:45 2020 +0000
description:
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.
diffstat:
sys/arch/mips/include/mips_param.h | 3 ++-
sys/arch/mips/include/proc.h | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r ed9193462d70 -r 07a83893ddec sys/arch/mips/include/mips_param.h
--- a/sys/arch/mips/include/mips_param.h Wed Aug 26 10:34:03 2020 +0000
+++ b/sys/arch/mips/include/mips_param.h Wed Aug 26 10:51:45 2020 +0000
@@ -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
diff -r ed9193462d70 -r 07a83893ddec sys/arch/mips/include/proc.h
--- a/sys/arch/mips/include/proc.h Wed Aug 26 10:34:03 2020 +0000
+++ b/sys/arch/mips/include/proc.h Wed Aug 26 10:51:45 2020 +0000
@@ -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 @@
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 {
Home |
Main Index |
Thread Index |
Old Index