| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: uvm_param.h,v 1.38 2018/08/22 01:05:24 msaitoh Exp $ */ | | 1 | /* $NetBSD: uvm_param.h,v 1.39 2020/06/25 16:36:43 mlelstv Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1991, 1993 | | 4 | * Copyright (c) 1991, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to Berkeley by | | 7 | * This code is derived from software contributed to Berkeley by |
8 | * The Mach Operating System project at Carnegie-Mellon University. | | 8 | * The Mach Operating System project at Carnegie-Mellon University. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -202,27 +202,27 @@ extern const int *const uvmexp_pageshift | | | @@ -202,27 +202,27 @@ extern const int *const uvmexp_pageshift |
202 | #ifndef VM_DEFAULT_ADDRESS_BOTTOMUP | | 202 | #ifndef VM_DEFAULT_ADDRESS_BOTTOMUP |
203 | #define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \ | | 203 | #define VM_DEFAULT_ADDRESS_BOTTOMUP(da, sz) \ |
204 | round_page((vaddr_t)(da) + (vsize_t)maxdmap) | | 204 | round_page((vaddr_t)(da) + (vsize_t)maxdmap) |
205 | #endif | | 205 | #endif |
206 | | | 206 | |
207 | extern unsigned int user_stack_guard_size; | | 207 | extern unsigned int user_stack_guard_size; |
208 | extern unsigned int user_thread_stack_guard_size; | | 208 | extern unsigned int user_thread_stack_guard_size; |
209 | #ifndef VM_DEFAULT_ADDRESS_TOPDOWN | | 209 | #ifndef VM_DEFAULT_ADDRESS_TOPDOWN |
210 | #define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \ | | 210 | #define VM_DEFAULT_ADDRESS_TOPDOWN(da, sz) \ |
211 | trunc_page(VM_MAXUSER_ADDRESS - MAXSSIZ - (sz) - user_stack_guard_size) | | 211 | trunc_page(VM_MAXUSER_ADDRESS - MAXSSIZ - (sz) - user_stack_guard_size) |
212 | #endif | | 212 | #endif |
213 | | | 213 | |
214 | extern int ubc_nwins; /* number of UBC mapping windows */ | | 214 | extern int ubc_nwins; /* number of UBC mapping windows */ |
215 | extern int ubc_winshift; /* shift for a UBC mapping window */ | | 215 | extern const int ubc_winshift; /* shift for a UBC mapping window */ |
216 | extern u_int uvm_emap_size; /* size of emap */ | | 216 | extern u_int uvm_emap_size; /* size of emap */ |
217 | | | 217 | |
218 | #else | | 218 | #else |
219 | /* out-of-kernel versions of round_page and trunc_page */ | | 219 | /* out-of-kernel versions of round_page and trunc_page */ |
220 | #define round_page(x) \ | | 220 | #define round_page(x) \ |
221 | ((((vaddr_t)(x) + (vm_page_size - 1)) / vm_page_size) * \ | | 221 | ((((vaddr_t)(x) + (vm_page_size - 1)) / vm_page_size) * \ |
222 | vm_page_size) | | 222 | vm_page_size) |
223 | #define trunc_page(x) \ | | 223 | #define trunc_page(x) \ |
224 | ((((vaddr_t)(x)) / vm_page_size) * vm_page_size) | | 224 | ((((vaddr_t)(x)) / vm_page_size) * vm_page_size) |
225 | | | 225 | |
226 | #endif /* _KERNEL */ | | 226 | #endif /* _KERNEL */ |
227 | | | 227 | |
228 | /* | | 228 | /* |