summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authormatt <matt@NetBSD.org>2008-01-06 03:11:42 +0000
committermatt <matt@NetBSD.org>2008-01-06 03:11:42 +0000
commit940cdbb35532bef4ec211d5f0bf024fe4c8db47f (patch)
treef020c9b6e7a230a0696d870922ca2c4f3f5df3ad /sys/arch
parentace1262f405e98dcf34944d902bd6a4fdbf2f2fe (diff)
current_intr_depth is dead. Make sure we don't use it anymore.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/arm/arm32/fault.c10
-rw-r--r--sys/arch/arm/arm32/pmap.c9
-rw-r--r--sys/arch/arm/include/cpu.h7
3 files changed, 13 insertions, 13 deletions
diff --git a/sys/arch/arm/arm32/fault.c b/sys/arch/arm/arm32/fault.c
index 4cfc24c9de6..4a6f727a7f8 100644
--- a/sys/arch/arm/arm32/fault.c
+++ b/sys/arch/arm/arm32/fault.c
@@ -1,4 +1,4 @@
-/* $NetBSD: fault.c,v 1.64 2007/02/18 07:25:35 matt Exp $ */
+/* $NetBSD: fault.c,v 1.65 2008/01/06 03:11:42 matt Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -81,7 +81,7 @@
#include "opt_kgdb.h"
#include <sys/types.h>
-__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.64 2007/02/18 07:25:35 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.65 2008/01/06 03:11:42 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -89,6 +89,7 @@ __KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.64 2007/02/18 07:25:35 matt Exp $");
#include <sys/user.h>
#include <sys/kernel.h>
#include <sys/kauth.h>
+#include <sys/cpu.h>
#include <uvm/uvm_extern.h>
#include <uvm/uvm_stat.h>
@@ -100,7 +101,6 @@ __KERNEL_RCSID(0, "$NetBSD: fault.c,v 1.64 2007/02/18 07:25:35 matt Exp $");
#include <machine/frame.h>
#include <arm/arm32/katelib.h>
-#include <machine/cpu.h>
#include <machine/intr.h>
#if defined(DDB) || defined(KGDB)
#include <machine/db_machdep.h>
@@ -443,7 +443,7 @@ data_abort_handler(trapframe_t *tf)
goto out;
}
- if (__predict_false(current_intr_depth > 0)) {
+ if (__predict_false(curcpu()->ci_idepth > 0)) {
if (pcb->pcb_onfault) {
tf->tf_r0 = EINVAL;
tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault;
@@ -832,7 +832,7 @@ prefetch_abort_handler(trapframe_t *tf)
}
#ifdef DIAGNOSTIC
- if (__predict_false(current_intr_depth > 0)) {
+ if (__predict_false(cpu_intr_p())) {
printf("\nNon-emulated prefetch abort with intr_depth > 0\n");
dab_fatal(tf, 0, tf->tf_pc, NULL, NULL);
}
diff --git a/sys/arch/arm/arm32/pmap.c b/sys/arch/arm/arm32/pmap.c
index b71a551f521..9777c7cb619 100644
--- a/sys/arch/arm/arm32/pmap.c
+++ b/sys/arch/arm/arm32/pmap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.170 2008/01/01 14:06:42 chris Exp $ */
+/* $NetBSD: pmap.c,v 1.171 2008/01/06 03:11:42 matt Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -194,8 +194,8 @@
#include "opt_lockdebug.h"
#include "opt_multiprocessor.h"
-#include <sys/types.h>
#include <sys/param.h>
+#include <sys/types.h>
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -203,6 +203,7 @@
#include <sys/user.h>
#include <sys/pool.h>
#include <sys/cdefs.h>
+#include <sys/cpu.h>
#include <uvm/uvm.h>
@@ -212,7 +213,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.170 2008/01/01 14:06:42 chris Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.171 2008/01/06 03:11:42 matt Exp $");
#ifdef PMAP_DEBUG
@@ -946,7 +947,7 @@ pmap_use_l1(pmap_t pm)
* Access to an L1 by the kernel pmap must not affect
* the LRU list.
*/
- if (current_intr_depth || pm == pmap_kernel())
+ if (cpu_intr_p() || pm == pmap_kernel())
return;
l1 = pm->pm_l1;
diff --git a/sys/arch/arm/include/cpu.h b/sys/arch/arm/include/cpu.h
index 0256f307e18..ae9ef11b9ac 100644
--- a/sys/arch/arm/include/cpu.h
+++ b/sys/arch/arm/include/cpu.h
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.48 2007/12/11 17:02:32 ad Exp $ */
+/* $NetBSD: cpu.h,v 1.49 2008/01/06 03:11:42 matt Exp $ */
/*
* Copyright (c) 1994-1996 Mark Brinicombe.
@@ -139,14 +139,13 @@ extern int cpu_do_powersave;
* CLKF_INTR: True if we took the interrupt from inside another
* interrupt handler.
*/
-extern int current_intr_depth;
#ifdef __PROG32
/* Hack to treat FPE time as interrupt time so we can measure it */
#define CLKF_INTR(frame) \
- ((current_intr_depth > 1) || \
+ ((curcpu()->ci_idepth > 1) || \
(frame->cf_if.if_spsr & PSR_MODE) == PSR_UND32_MODE)
#else
-#define CLKF_INTR(frame) (current_intr_depth > 1)
+#define CLKF_INTR(frame) (curcpu()->ci_idepth > 1)
#endif
/*