Source-Changes-HG archive

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

[src/netbsd-7]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/ce30947e5b47
branches:  netbsd-7
changeset: 799802:ce30947e5b47
user:      snj <snj%NetBSD.org@localhost>
date:      Fri Feb 12 10:55:35 2016 +0000

description:
Pull up following revision(s) (requested by riastradh in ticket #1115):
        sys/arch/x86/x86/pmap.c: patch
Use IPL_NONE for pserialized lock.  Assert sleepable.  (OOPS.)

diffstat:

 sys/arch/x86/x86/pmap.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r 13c7f50feffb -r ce30947e5b47 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c   Thu Feb 11 23:59:00 2016 +0000
+++ b/sys/arch/x86/x86/pmap.c   Fri Feb 12 10:55:35 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.183.2.2 2015/04/23 07:31:16 snj Exp $       */
+/*     $NetBSD: pmap.c,v 1.183.2.3 2016/02/12 10:55:35 snj Exp $       */
 
 /*-
  * Copyright (c) 2008, 2010 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.183.2.2 2015/04/23 07:31:16 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.183.2.3 2016/02/12 10:55:35 snj Exp $");
 
 #include "opt_user_ldt.h"
 #include "opt_lockdebug.h"
@@ -490,7 +490,7 @@
 pmap_pv_init(void)
 {
 
-       mutex_init(&pv_unmanaged.lock, MUTEX_DEFAULT, IPL_VM);
+       mutex_init(&pv_unmanaged.lock, MUTEX_DEFAULT, IPL_NONE);
        pv_unmanaged.psz = pserialize_create();
        pv_unmanaged.list = NULL;
 }
@@ -504,6 +504,9 @@
        KASSERT(start == trunc_page(start));
        KASSERT(size == trunc_page(size));
 
+       /* We may sleep for allocation.  */
+       ASSERT_SLEEPABLE();
+
        npages = size >> PAGE_SHIFT;
        pvt = kmem_zalloc(offsetof(struct pv_track, pvt_pages[npages]),
            KM_SLEEP);
@@ -526,6 +529,9 @@
        KASSERT(start == trunc_page(start));
        KASSERT(size == trunc_page(size));
 
+       /* We may sleep for pserialize_perform.  */
+       ASSERT_SLEEPABLE();
+
        mutex_enter(&pv_unmanaged.lock);
        for (pvtp = &pv_unmanaged.list;
             (pvt = *pvtp) != NULL;



Home | Main Index | Thread Index | Old Index