Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/alpha Nowadays we can create new kernel threa...



details:   https://anonhg.NetBSD.org/src/rev/59da55fcf9da
branches:  trunk
changeset: 831274:59da55fcf9da
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Mar 19 10:31:56 2018 +0000

description:
Nowadays we can create new kernel threads late after boot, so if we are
unable to find physically continous pages for their uarea, just allocate
them via uvm_km_alloc(), that is: make cpu_uarea_alloc() fail instead
of panic. cpu_uarea_free() already deals with this.

Should fix PR port-alpha/53077.

Discussed with maxv and mrg.

diffstat:

 sys/arch/alpha/alpha/vm_machdep.c |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (32 lines):

diff -r 7da8ff7fc924 -r 59da55fcf9da sys/arch/alpha/alpha/vm_machdep.c
--- a/sys/arch/alpha/alpha/vm_machdep.c Mon Mar 19 09:06:20 2018 +0000
+++ b/sys/arch/alpha/alpha/vm_machdep.c Mon Mar 19 10:31:56 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.113 2014/05/16 19:18:21 matt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.114 2018/03/19 10:31:56 martin Exp $ */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.113 2014/05/16 19:18:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.114 2018/03/19 10:31:56 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -227,11 +227,8 @@
         * direct-mapped.
         */
        error = uvm_pglistalloc(USPACE, 0, ptoa(physmem), 0, 0, &pglist, 1, 1);
-       if (error) {
-               if (!system)
-                       return NULL;
-               panic("%s: uvm_pglistalloc failed: %d", __func__, error);
-       }
+       if (error)
+               return NULL;
 
        /*
         * Get the physical address from the first page.



Home | Main Index | Thread Index | Old Index