Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/uvm Revert my previous change. I missed an entry on NXR.
details: https://anonhg.NetBSD.org/src/rev/41687a09bc4b
branches: trunk
changeset: 345367:41687a09bc4b
user: maxv <maxv%NetBSD.org@localhost>
date: Sun May 22 09:10:37 2016 +0000
description:
Revert my previous change. I missed an entry on NXR.
diffstat:
sys/uvm/uvm_glue.c | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diffs (66 lines):
diff -r f1f65a9a572d -r 41687a09bc4b sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Sun May 22 08:02:23 2016 +0000
+++ b/sys/uvm/uvm_glue.c Sun May 22 09:10:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_glue.c,v 1.162 2016/05/21 06:37:28 maxv Exp $ */
+/* $NetBSD: uvm_glue.c,v 1.163 2016/05/22 09:10:37 maxv Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.162 2016/05/21 06:37:28 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.163 2016/05/22 09:10:37 maxv Exp $");
#include "opt_kgdb.h"
#include "opt_kstack.h"
@@ -240,28 +240,31 @@
static void *
uarea_poolpage_alloc(struct pool *pp, int flags)
{
-#if defined(PMAP_MAP_POOLPAGE) && (USPACE == PAGE_SIZE && USPACE_ALIGN == 0)
- struct vm_page *pg;
- vaddr_t va;
+#if defined(PMAP_MAP_POOLPAGE)
+ if (USPACE == PAGE_SIZE && USPACE_ALIGN == 0) {
+ struct vm_page *pg;
+ vaddr_t va;
#if defined(PMAP_ALLOC_POOLPAGE)
- pg = PMAP_ALLOC_POOLPAGE(
- ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
+ pg = PMAP_ALLOC_POOLPAGE(
+ ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
#else
- pg = uvm_pagealloc(NULL, 0, NULL,
- ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
-#endif /* PMAP_ALLOC_POOLPAGE */
- if (pg == NULL)
- return NULL;
- va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg));
- if (va == 0)
- uvm_pagefree(pg);
- return (void *)va;
-#elif defined(__HAVE_CPU_UAREA_ROUTINES)
+ pg = uvm_pagealloc(NULL, 0, NULL,
+ ((flags & PR_WAITOK) == 0 ? UVM_KMF_NOWAIT : 0));
+#endif
+ if (pg == NULL)
+ return NULL;
+ va = PMAP_MAP_POOLPAGE(VM_PAGE_TO_PHYS(pg));
+ if (va == 0)
+ uvm_pagefree(pg);
+ return (void *)va;
+ }
+#endif
+#if defined(__HAVE_CPU_UAREA_ROUTINES)
void *va = cpu_uarea_alloc(false);
if (va)
return (void *)va;
-#endif /* __HAVE_CPU_UAREA_ROUTINES */
+#endif
return (void *)uvm_km_alloc(kernel_map, pp->pr_alloc->pa_pagesz,
USPACE_ALIGN, UVM_KMF_WIRED |
((flags & PR_WAITOK) ? UVM_KMF_WAITVA :
Home |
Main Index |
Thread Index |
Old Index