Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Consistently use kpreempt_*() outside scheduler path.
details: https://anonhg.NetBSD.org/src/rev/dc5fe5871150
branches: trunk
changeset: 334032:dc5fe5871150
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Thu Nov 27 14:22:09 2014 +0000
description:
Consistently use kpreempt_*() outside scheduler path.
diffstat:
sys/arch/x86/x86/fpu.c | 8 ++++----
sys/arch/x86/x86/pmap.c | 12 ++++++------
sys/uvm/uvm_emap.c | 10 +++++-----
sys/uvm/uvm_glue.c | 8 ++++----
4 files changed, 19 insertions(+), 19 deletions(-)
diffs (164 lines):
diff -r 4ed95af04717 -r dc5fe5871150 sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c Thu Nov 27 11:42:02 2014 +0000
+++ b/sys/arch/x86/x86/fpu.c Thu Nov 27 14:22:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu.c,v 1.9 2014/02/25 22:16:52 dsl Exp $ */
+/* $NetBSD: fpu.c,v 1.10 2014/11/27 14:22:09 uebayasi Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc. All
@@ -100,7 +100,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.9 2014/02/25 22:16:52 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.10 2014/11/27 14:22:09 uebayasi Exp $");
#include "opt_multiprocessor.h"
@@ -408,7 +408,7 @@
/* Save our state if on a remote CPU. */
if (pcb->pcb_fpcpu != NULL) {
/* Explicitly disable preemption before dropping spl. */
- KPREEMPT_DISABLE(l);
+ kpreempt_disable();
splx(s);
/* Actually enable interrupts */
@@ -417,7 +417,7 @@
fpusave_lwp(l, true);
KASSERT(pcb->pcb_fpcpu == NULL);
s = splhigh();
- KPREEMPT_ENABLE(l);
+ kpreempt_enable();
}
/*
diff -r 4ed95af04717 -r dc5fe5871150 sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c Thu Nov 27 11:42:02 2014 +0000
+++ b/sys/arch/x86/x86/pmap.c Thu Nov 27 14:22:09 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.185 2014/11/22 06:45:08 cherry Exp $ */
+/* $NetBSD: pmap.c,v 1.186 2014/11/27 14:22:09 uebayasi 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.185 2014/11/22 06:45:08 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.186 2014/11/27 14:22:09 uebayasi Exp $");
#include "opt_user_ldt.h"
#include "opt_lockdebug.h"
@@ -2915,7 +2915,7 @@
pa = 0;
l = curlwp;
- KPREEMPT_DISABLE(l);
+ kpreempt_disable();
ci = l->l_cpu;
if (__predict_true(!ci->ci_want_pmapload && ci->ci_pmap == pmap) ||
pmap == pmap_kernel()) {
@@ -2948,7 +2948,7 @@
if (__predict_false(hard)) {
pmap_unmap_ptes(pmap, pmap2);
}
- KPREEMPT_ENABLE(l);
+ kpreempt_enable();
if (pap != NULL) {
*pap = pa;
}
@@ -4395,7 +4395,7 @@
* If we have torn down this pmap, invalidate non-global TLB
* entries on any processors using it.
*/
- KPREEMPT_DISABLE(l);
+ kpreempt_disable();
if (__predict_false(l->l_md.md_gc_pmap == pmap)) {
l->l_md.md_gc_pmap = NULL;
pmap_tlb_shootdown(pmap, (vaddr_t)-1LL, 0, TLBSHOOT_UPDATE);
@@ -4405,7 +4405,7 @@
* complete before returning control to the caller.
*/
pmap_tlb_shootnow();
- KPREEMPT_ENABLE(l);
+ kpreempt_enable();
/*
* Now that shootdowns are complete, process deferred frees,
diff -r 4ed95af04717 -r dc5fe5871150 sys/uvm/uvm_emap.c
--- a/sys/uvm/uvm_emap.c Thu Nov 27 11:42:02 2014 +0000
+++ b/sys/uvm/uvm_emap.c Thu Nov 27 14:22:09 2014 +0000
@@ -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 @@
* 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 @@
ucpu->emap_gen = curgen;
l->l_emap_gen = curgen;
KASSERT((signed int)(curgen - gen) >= 0);
- KPREEMPT_ENABLE(l);
+ kpreempt_enable();
}
/*
diff -r 4ed95af04717 -r dc5fe5871150 sys/uvm/uvm_glue.c
--- a/sys/uvm/uvm_glue.c Thu Nov 27 11:42:02 2014 +0000
+++ b/sys/uvm/uvm_glue.c Thu Nov 27 14:22:09 2014 +0000
@@ -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 @@
/*
* 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);
}
Home |
Main Index |
Thread Index |
Old Index