Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 When allocing a l1page, if a page isn't a...
details: https://anonhg.NetBSD.org/src/rev/9b8e94d0b3cf
branches: trunk
changeset: 333550:9b8e94d0b3cf
user: matt <matt%NetBSD.org@localhost>
date: Sat Nov 08 08:01:34 2014 +0000
description:
When allocing a l1page, if a page isn't available, use uvm_wait to wait
for one to become available. Should fix PR/49364.
diffstat:
sys/arch/arm/arm32/pmap.c | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
diffs (42 lines):
diff -r fdd27abaa2ae -r 9b8e94d0b3cf sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Sat Nov 08 05:57:41 2014 +0000
+++ b/sys/arch/arm/arm32/pmap.c Sat Nov 08 08:01:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.311 2014/11/07 12:44:58 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.312 2014/11/08 08:01:34 matt Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -215,7 +215,7 @@
#include <arm/locore.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.311 2014/11/07 12:44:58 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.312 2014/11/08 08:01:34 matt Exp $");
//#define PMAP_DEBUG
#ifdef PMAP_DEBUG
@@ -1282,13 +1282,18 @@
{
#ifdef ARM_MMU_EXTENDED
#ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
+ struct vm_page *pg;
+ bool ok __diagused;
+ for (;;) {
#ifdef PMAP_NEED_ALLOC_POOLPAGE
- struct vm_page *pg = arm_pmap_alloc_poolpage(UVM_PGA_ZERO);
+ pg = arm_pmap_alloc_poolpage(UVM_PGA_ZERO);
#else
- struct vm_page *pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_ZERO);
-#endif
- bool ok __diagused;
- KASSERT(pg != NULL);
+ pg = uvm_pagealloc(NULL, 0, NULL, UVM_PGA_ZERO);
+#endif
+ if (pg != NULL)
+ break;
+ uvm_wait("pmapl1alloc");
+ }
pm->pm_l1_pa = VM_PAGE_TO_PHYS(pg);
vaddr_t va = pmap_direct_mapped_phys(pm->pm_l1_pa, &ok, 0);
KASSERT(ok);
Home |
Main Index |
Thread Index |
Old Index