Module Name: src Committed By: uebayasi Date: Thu Nov 27 14:25:01 UTC 2014
Modified Files: src/sys/uvm: uvm_emap.c uvm_glue.c Log Message: Consistently use kpreempt_*() outside scheduler path. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/uvm/uvm_emap.c cvs rdiff -u -r1.160 -r1.161 src/sys/uvm/uvm_glue.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_emap.c diff -u src/sys/uvm/uvm_emap.c:1.10 src/sys/uvm/uvm_emap.c:1.11 --- src/sys/uvm/uvm_emap.c:1.10 Sun Sep 15 15:51:23 2013 +++ src/sys/uvm/uvm_emap.c Thu Nov 27 14:25:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_emap.c,v 1.10 2013/09/15 15:51:23 martin Exp $ */ +/* $NetBSD: uvm_emap.c,v 1.11 2014/11/27 14:25:01 uebayasi Exp $ */ /*- * Copyright (c) 2009, 2010 The NetBSD Foundation, Inc. @@ -80,7 +80,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_emap.c,v 1.10 2013/09/15 15:51:23 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_emap.c,v 1.11 2014/11/27 14:25:01 uebayasi Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -298,12 +298,12 @@ uvm_emap_consume(u_int gen) * This test assumes two's complement arithmetic and allows * ~2B missed updates before it will produce bad results. */ - KPREEMPT_DISABLE(l); + kpreempt_disable(); ci = l->l_cpu; ucpu = ci->ci_data.cpu_uvm; if (__predict_true((signed int)(ucpu->emap_gen - gen) >= 0)) { l->l_emap_gen = ucpu->emap_gen; - KPREEMPT_ENABLE(l); + kpreempt_enable(); return; } @@ -329,7 +329,7 @@ uvm_emap_consume(u_int gen) ucpu->emap_gen = curgen; l->l_emap_gen = curgen; KASSERT((signed int)(curgen - gen) >= 0); - KPREEMPT_ENABLE(l); + kpreempt_enable(); } /* Index: src/sys/uvm/uvm_glue.c diff -u src/sys/uvm/uvm_glue.c:1.160 src/sys/uvm/uvm_glue.c:1.161 --- src/sys/uvm/uvm_glue.c:1.160 Sat Sep 1 00:26:37 2012 +++ src/sys/uvm/uvm_glue.c Thu Nov 27 14:25:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_glue.c,v 1.160 2012/09/01 00:26:37 matt Exp $ */ +/* $NetBSD: uvm_glue.c,v 1.161 2014/11/27 14:25:01 uebayasi 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.160 2012/09/01 00:26:37 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_glue.c,v 1.161 2014/11/27 14:25:01 uebayasi Exp $"); #include "opt_kgdb.h" #include "opt_kstack.h" @@ -431,11 +431,11 @@ uvm_proc_exit(struct proc *p) /* * borrow proc0's address space. */ - KPREEMPT_DISABLE(l); + kpreempt_disable(); pmap_deactivate(l); p->p_vmspace = proc0.p_vmspace; pmap_activate(l); - KPREEMPT_ENABLE(l); + kpreempt_enable(); uvmspace_free(ovm); }