summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2001-11-09 02:50:08 +0000
committerart <art@openbsd.org>2001-11-09 02:50:08 +0000
commit6fa14a89b77cfc6d85b9193d02ef7e05bd36087a (patch)
treecb7c8997f45ae6ad9810b5a36419615f59ebad45
parentActually allow pa == 0 in pmap_extract, and don't set *pap if we fail. (diff)
downloadwireguard-openbsd-6fa14a89b77cfc6d85b9193d02ef7e05bd36087a.tar.xz
wireguard-openbsd-6fa14a89b77cfc6d85b9193d02ef7e05bd36087a.zip
Don't uvm_pagezero here, allocate a zeroed page instead.
-rw-r--r--sys/arch/alpha/alpha/pmap.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c
index 20063bfda21..6986d5fe846 100644
--- a/sys/arch/alpha/alpha/pmap.c
+++ b/sys/arch/alpha/alpha/pmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pmap.c,v 1.20 2001/11/09 02:47:33 art Exp $ */
+/* $OpenBSD: pmap.c,v 1.21 2001/11/09 02:50:08 art Exp $ */
/* $NetBSD: pmap.c,v 1.154 2000/12/07 22:18:55 thorpej Exp $ */
/*-
@@ -3281,10 +3281,9 @@ pmap_physpage_alloc(int usage, paddr_t *pap)
* properly initialize it in the constructor.
*/
- pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_USERESERVE);
+ pg = uvm_pagealloc(NULL, 0, NULL, usage == PGU_L1PT ?
+ UVM_PGA_USERESERVE : UVM_PGA_USERESERVE|UVM_PGA_ZERO);
if (pg != NULL) {
- if (usage != PGU_L1PT)
- uvm_pagezero(pg);
pa = VM_PAGE_TO_PHYS(pg);
pvh = pa_to_pvh(pa);