Module Name:    src
Committed By:   thorpej
Date:           Fri Jan 19 18:18:56 UTC 2024

Modified Files:
        src/sys/arch/amiga/amiga: locore.s machdep.c
        src/sys/arch/amiga/include: cpu.h
        src/sys/arch/atari/atari: intr.c locore.s
        src/sys/arch/atari/include: intr.h
        src/sys/arch/evbcf/include: cpu.h
        src/sys/arch/hp300/hp300: locore.s
        src/sys/arch/hp300/include: cpu.h
        src/sys/arch/luna68k/luna68k: locore.s
        src/sys/arch/m68k/include: intr.h
        src/sys/arch/m68k/m68k: m68k_intr.c m68k_intr_stubs.s
        src/sys/arch/mac68k/mac68k: intr.c
        src/sys/arch/mvme68k/include: cpu.h
        src/sys/arch/mvme68k/mvme68k: trap.c
        src/sys/arch/news68k/include: cpu.h
        src/sys/arch/news68k/news68k: locore.s
        src/sys/arch/next68k/include: cpu.h
        src/sys/arch/next68k/next68k: trap.c
        src/sys/arch/sun2/sun2: clock.c
        src/sys/arch/sun3/sun3: clock.c
        src/sys/arch/sun3/sun3x: clock.c
        src/sys/arch/sun68k/include: cpu.h
        src/sys/arch/x68k/x68k: locore.s machdep.c

Log Message:
Consistently use "intr_depth" as the name of the interrupt depth counter
on m68k platforms.


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/arch/amiga/amiga/locore.s
cvs rdiff -u -r1.253 -r1.254 src/sys/arch/amiga/amiga/machdep.c
cvs rdiff -u -r1.86 -r1.87 src/sys/arch/amiga/include/cpu.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/atari/atari/intr.c
cvs rdiff -u -r1.126 -r1.127 src/sys/arch/atari/atari/locore.s
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/include/intr.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbcf/include/cpu.h
cvs rdiff -u -r1.184 -r1.185 src/sys/arch/hp300/hp300/locore.s
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/hp300/include/cpu.h
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/luna68k/luna68k/locore.s
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/include/intr.h
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/m68k/m68k/m68k_intr.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/m68k/m68k/m68k_intr_stubs.s
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/mac68k/mac68k/intr.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/mvme68k/include/cpu.h
cvs rdiff -u -r1.115 -r1.116 src/sys/arch/mvme68k/mvme68k/trap.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/next68k/include/cpu.h
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/next68k/next68k/trap.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sun2/sun2/clock.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sun3/sun3/clock.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/sun3/sun3x/clock.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sun68k/include/cpu.h
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/x68k/x68k/locore.s
cvs rdiff -u -r1.211 -r1.212 src/sys/arch/x68k/x68k/machdep.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/arch/amiga/amiga/locore.s
diff -u src/sys/arch/amiga/amiga/locore.s:1.171 src/sys/arch/amiga/amiga/locore.s:1.172
--- src/sys/arch/amiga/amiga/locore.s:1.171	Fri Jan 19 17:08:42 2024
+++ src/sys/arch/amiga/amiga/locore.s	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.171 2024/01/19 17:08:42 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.172 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -440,16 +440,16 @@ ENTRY_NOPROFILE(trace)
  * and serial RBF (int5) specially, to improve performance
  */
 ENTRY_NOPROFILE(spurintr)
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	addql	#1,_C_LABEL(intrcnt)+0
 	INTERRUPT_SAVEREG
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 ENTRY_NOPROFILE(lev5intr)
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 #include "ser.h"
 #if NSER > 0
@@ -461,12 +461,12 @@ ENTRY_NOPROFILE(lev5intr)
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
 	addql	#1,_C_LABEL(intrcnt)+20
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 #ifdef DRACO
 ENTRY_NOPROFILE(DraCoLev2intr)
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 
 	CIAAADDR(%a0)
@@ -488,12 +488,12 @@ ENTRY_NOPROFILE(DraCoLev2intr)
 Ldraciaend:
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 /* XXX on the DraCo rev. 4 or later, lev 1 is vectored here. */
 ENTRY_NOPROFILE(DraCoLev1intr)
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	movl	_C_LABEL(draco_ioct),%a0
 	btst	#5,%a0@(7)
@@ -521,12 +521,12 @@ Ldrclockretry:
 
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)	| XXXX: shouldn't we call the normal lev1?
 
 /* XXX on the DraCo, lev 1, 3, 4, 5 and 6 are vectored here by initcpu() */
 ENTRY_NOPROFILE(DraCoIntr)
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 Ldrintrcommon:
 	lea	_ASM_LABEL(Drintrcnt)-4,%a0
@@ -539,7 +539,7 @@ Ldrintrcommon:
 	addql	#4,%sp			| pop SR
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 #endif
 
@@ -550,7 +550,7 @@ ENTRY_NOPROFILE(lev3intr)
 #ifndef LEV6_DEFER
 ENTRY_NOPROFILE(lev4intr)
 #endif
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 Lintrcommon:
 	lea	_C_LABEL(intrcnt),%a0
@@ -563,7 +563,7 @@ Lintrcommon:
 	addql	#4,%sp			| pop SR
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 /* XXX used to be ifndef DRACO; vector will be overwritten by initcpu() */
@@ -575,7 +575,7 @@ ENTRY_NOPROFILE(lev6intr)
 	 * as we return. Block generation of level 6 ints until
 	 * we have dealt with this one.
 	 */
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	moveml	%d0/%a0,%sp@-
 	INTREQRADDR(%a0)
 	movew	%a0@,%d0
@@ -587,18 +587,18 @@ ENTRY_NOPROFILE(lev6intr)
 	movew	#INTF_EXTER,%a0@
 	movew	#INTF_SETCLR+INTF_AUD3,%a0@	| make sure THIS one is ok...
 	moveml	%sp@+,%d0/%a0
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	rte
 Llev6spur:
 	addql	#1,_C_LABEL(intrcnt)+36	| count spurious level 6 interrupts
 	moveml	%sp@+,%d0/%a0
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	rte
 
 ENTRY_NOPROFILE(lev4intr)
 ENTRY_NOPROFILE(fake_lev6intr)
 #endif
-	addql	#1,_C_LABEL(interrupt_depth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 #ifdef LEV6_DEFER
 	/*
@@ -642,7 +642,7 @@ Lskipciab:
 Llev6done:
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(interrupt_depth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		| all done [can we do rte here?]
 Lchkexter:
 | check to see if EXTER request is really set?

Index: src/sys/arch/amiga/amiga/machdep.c
diff -u src/sys/arch/amiga/amiga/machdep.c:1.253 src/sys/arch/amiga/amiga/machdep.c:1.254
--- src/sys/arch/amiga/amiga/machdep.c:1.253	Wed Dec 20 00:40:42 2023
+++ src/sys/arch/amiga/amiga/machdep.c	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.253 2023/12/20 00:40:42 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.254 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -50,7 +50,7 @@
 #include "empm.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.253 2023/12/20 00:40:42 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.254 2024/01/19 18:18:53 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -131,7 +131,7 @@ void ser_outintr(void);
 void fdintr(int);
 #endif
 
-volatile unsigned int interrupt_depth = 0;
+volatile unsigned int intr_depth = 0;
 
 struct vm_map *phys_map = NULL;
 
@@ -1120,7 +1120,7 @@ bool
 cpu_intr_p(void)
 {
 
-	return interrupt_depth != 0;
+	return intr_depth != 0;
 }
 
 #if defined(DEBUG) && !defined(PANICBUTTON)

Index: src/sys/arch/amiga/include/cpu.h
diff -u src/sys/arch/amiga/include/cpu.h:1.86 src/sys/arch/amiga/include/cpu.h:1.87
--- src/sys/arch/amiga/include/cpu.h:1.86	Fri Jan 19 17:08:42 2024
+++ src/sys/arch/amiga/include/cpu.h	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.86 2024/01/19 17:08:42 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.87 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@
 #include <m68k/cpu.h>
 
 #if defined(_KERNEL)
-extern volatile unsigned int interrupt_depth;
+extern volatile unsigned int intr_depth;
 /*
  * Arguments to hardclock and gatherstats encapsulate the previous
  * machine state in an opaque clockframe.  On the amiga, we use
@@ -66,7 +66,7 @@ struct clockframe {
 
 #define	CLKF_USERMODE(framep)	(((framep)->cf_sr & PSL_S) == 0)
 #define	CLKF_PC(framep)		((framep)->cf_pc)
-#define	CLKF_INTR(framep)	(interrupt_depth > 1)
+#define	CLKF_INTR(framep)	(intr_depth > 1)
 
 /*
  * Preempt the current process if in interrupt from user mode,

Index: src/sys/arch/atari/atari/intr.c
diff -u src/sys/arch/atari/atari/intr.c:1.31 src/sys/arch/atari/atari/intr.c:1.32
--- src/sys/arch/atari/atari/intr.c:1.31	Fri Jan  6 10:28:27 2023
+++ src/sys/arch/atari/atari/intr.c	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.31 2023/01/06 10:28:27 tsutsui Exp $	*/
+/*	$NetBSD: intr.c,v 1.32 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.31 2023/01/06 10:28:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.32 2024/01/19 18:18:53 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3
 typedef LIST_HEAD(, intrhand) ih_list_t;
 static ih_list_t autovec_list[AVEC_MAX - AVEC_MIN + 1];
 static ih_list_t uservec_list[UVEC_MAX - UVEC_MIN + 1];
-int idepth;
+int intr_depth;
 volatile int ssir;
 
 void
@@ -311,7 +311,7 @@ bool
 cpu_intr_p(void)
 {
 
-	return idepth != 0;
+	return intr_depth != 0;
 }
 
 const uint16_t ipl2psl_table[NIPL] = {

Index: src/sys/arch/atari/atari/locore.s
diff -u src/sys/arch/atari/atari/locore.s:1.126 src/sys/arch/atari/atari/locore.s:1.127
--- src/sys/arch/atari/atari/locore.s:1.126	Wed Jan 17 12:33:49 2024
+++ src/sys/arch/atari/atari/locore.s	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.126 2024/01/17 12:33:49 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.127 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -342,11 +342,11 @@ Lfptnull:
  */
 
 ENTRY_NOPROFILE(intr_glue)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(intr_dispatch)	|  handle interrupt
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 ENTRY_NOPROFILE(lev2intr)
@@ -358,11 +358,11 @@ ENTRY_NOPROFILE(lev4intr)		|  VBL interr
 	jne	1f			|  Yes, go service a VBL-request
 	rte				|  Nothing to do.
 1:
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(falcon_display_switch)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 #endif /* FALCON_VIDEO */
 	rte
 
@@ -376,7 +376,7 @@ ENTRY_NOPROFILE(lev6intr)
 #define	PLX_PCICR	0x4204
 #define	PLX_CNTRL	0x42ec
 #define	PLX_DMCFGA	0x42ac
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	moveml	%d0-%d2/%a0-%a1,%sp@-
 	movw	%sp@(20),%sp@-		|  push previous SR value
 	clrw	%sp@-			|	padded to longword
@@ -399,7 +399,7 @@ ENTRY_NOPROFILE(lev6intr)
 	jbsr	_C_LABEL(milan_isa_intr)
 	addql	#8,%sp
 	moveml  %sp@+,%d0-%d2/%a0-%a1
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 /*
@@ -461,7 +461,7 @@ ENTRY_NOPROFILE(lev7intr)
 
 ENTRY_NOPROFILE(lev3intr)
 ENTRY_NOPROFILE(badtrap)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	movw	%sp@(22),%sp@-		|  push exception vector info
 	clrw	%sp@-
@@ -469,11 +469,11 @@ ENTRY_NOPROFILE(badtrap)
 	jbsr	_C_LABEL(straytrap)	|  report
 	addql	#8,%sp			|  pop args
 	INTERRUPT_RESTOREREG		|  restore regs
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		|  all done
 
 ENTRY_NOPROFILE(badmfpint)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG		|  save scratch regs
 	movw	%sp@(22),%sp@-		|  push exception vector info
 	clrw	%sp@-
@@ -481,7 +481,7 @@ ENTRY_NOPROFILE(badmfpint)
 	jbsr	_C_LABEL(straymfpint)	|  report
 	addql	#8,%sp			|  pop args
 	INTERRUPT_RESTOREREG		|  restore regs
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		|  all done
 
 ENTRY_NOPROFILE(trap0)
@@ -644,7 +644,7 @@ ENTRY_NOPROFILE(spurintr)
 
 	/* MFP timer A handler --- System clock --- */
 ASENTRY_NOPROFILE(mfp_tima)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG		|  save scratch registers
 	movl	%sp,%sp@-		|  push pointer to clockframe
 	jbsr	_C_LABEL(hardclock)	|  call generic clock int routine
@@ -653,26 +653,26 @@ ASENTRY_NOPROFILE(mfp_tima)
 					|  add another system clock interrupt
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG		|  restore scratch regs
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		|  all done
 
 #ifdef STATCLOCK
 	/* MFP timer C handler --- Stat/Prof clock --- */
 ASENTRY_NOPROFILE(mfp_timc)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG		|  save scratch registers
 	jbsr	_C_LABEL(statintr)	|  call statistics clock handler
 	addql	#1,_C_LABEL(intrcnt)+36	|  add another stat clock interrupt
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG		|  restore scratch regs
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		|  all done
 #endif /* STATCLOCK */
 
 #if NKBD > 0
 	/* MFP ACIA handler --- keyboard/midi --- */
 ASENTRY_NOPROFILE(mfp_kbd)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	addql	#1,_C_LABEL(intrcnt)+8	|  add another kbd/mouse interrupt
 
 	INTERRUPT_SAVEREG		|  save scratch registers
@@ -682,14 +682,14 @@ ASENTRY_NOPROFILE(mfp_kbd)
 	addql	#4,%sp			|  pop SR
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG		|  restore scratch regs
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 #endif /* NKBD */
 
 #if NNCRSCSI > 0
 	/* MFP2 SCSI DMA handler --- NCR5380 --- */
 ASENTRY_NOPROFILE(mfp2_5380dm)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	addql	#1,_C_LABEL(intrcnt)+24	|  add another 5380-DMA interrupt
 
 	INTERRUPT_SAVEREG		|  save scratch registers
@@ -699,12 +699,12 @@ ASENTRY_NOPROFILE(mfp2_5380dm)
 	addql	#4,%sp			|  pop SR
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG		|  restore scratch regs
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 	/* MFP2 SCSI handler --- NCR5380 --- */
 ASENTRY_NOPROFILE(mfp2_5380)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	addql	#1,_C_LABEL(intrcnt)+20	|  add another 5380-SCSI interrupt
 
 	INTERRUPT_SAVEREG		|  save scratch registers
@@ -714,14 +714,14 @@ ASENTRY_NOPROFILE(mfp2_5380)
 	addql	#4,%sp			|  pop SR
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG		|  restore scratch regs
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 #endif /* NNCRSCSI > 0 */
 
 #ifdef _ATARIHW_
 	/* Level 1 (Software) interrupt handler */
 ENTRY_NOPROFILE(lev1intr)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG		|  save scratch registers
 	movl	_C_LABEL(stio_addr),%a0 |  get KVA of ST-IO area
 	moveb	#0, %a0@(SCU_SOFTINT)	|  Turn off software interrupt
@@ -729,7 +729,7 @@ ENTRY_NOPROFILE(lev1intr)
 	jbsr	_C_LABEL(nullop)	|  XXX handle software interrupts
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 	/*
@@ -743,7 +743,7 @@ ENTRY_NOPROFILE(lev7intr)
 	 * Note that the nmi has to be turned off while handling it because
 	 * the hardware modification has no de-bouncing logic....
 	 */
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	movl	%a0, %sp@-		|  save a0
 	movl	_C_LABEL(stio_addr),%a0	|  get KVA of ST-IO area
 	movb	%a0@(SCU_SYSMASK),%sp@-	|  save current sysmask
@@ -751,7 +751,7 @@ ENTRY_NOPROFILE(lev7intr)
 	trap	#15			|  drop into the debugger
 	movb	%sp@+, %a0@(SCU_SYSMASK)|  restore sysmask
 	movl	%sp@+, %a0		|  restore a0
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 #endif
 	addql	#1,_C_LABEL(intrcnt)+28	|  add another nmi interrupt
 	rte				|  all done

Index: src/sys/arch/atari/include/intr.h
diff -u src/sys/arch/atari/include/intr.h:1.23 src/sys/arch/atari/include/intr.h:1.24
--- src/sys/arch/atari/include/intr.h:1.23	Tue Jul 11 10:58:03 2023
+++ src/sys/arch/atari/include/intr.h	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.23 2023/07/11 10:58:03 riastradh Exp $	*/
+/*	$NetBSD: intr.h,v 1.24 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2007 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@ typedef struct {
 int spl0(void);
 
 extern const uint16_t ipl2psl_table[NIPL];
-extern int idepth;
+extern int intr_depth;
 
 typedef int ipl_t;
 

Index: src/sys/arch/evbcf/include/cpu.h
diff -u src/sys/arch/evbcf/include/cpu.h:1.7 src/sys/arch/evbcf/include/cpu.h:1.8
--- src/sys/arch/evbcf/include/cpu.h:1.7	Thu Jan 18 14:39:06 2024
+++ src/sys/arch/evbcf/include/cpu.h	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.7 2024/01/18 14:39:06 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.8 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -77,8 +77,8 @@ struct clockframe {
  * (Remember, the clock interrupt handler itself will cause the
  * depth counter to be incremented).
  */
-extern volatile unsigned int interrupt_depth;
-#define	CLKF_INTR(framep)	(interrupt_depth > 1)
+extern volatile unsigned int intr_depth;
+#define	CLKF_INTR(framep)	(intr_depth > 1)
 
 
 /*

Index: src/sys/arch/hp300/hp300/locore.s
diff -u src/sys/arch/hp300/hp300/locore.s:1.184 src/sys/arch/hp300/hp300/locore.s:1.185
--- src/sys/arch/hp300/hp300/locore.s:1.184	Wed Jan 17 12:33:49 2024
+++ src/sys/arch/hp300/hp300/locore.s	Fri Jan 19 18:18:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.184 2024/01/17 12:33:49 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.185 2024/01/19 18:18:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -804,7 +804,7 @@ Lbrkpt3:
 	movel	%d1,EVCNT_COUNTER(ipl)
 
 ENTRY_NOPROFILE(lev6intr)	/* level 6: clock */
-	addql	#1,_C_LABEL(idepth)	| entering interrupt
+	addql	#1,_C_LABEL(intr_depth)	| entering interrupt
 	INTERRUPT_SAVEREG
 	CLKADDR(%a0)
 	movb	%a0@(CLKSR),%d0		| read clock status
@@ -873,7 +873,7 @@ Lrecheck:
 					    |  generated the interrupt
 #endif
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)	| exiting from interrupt
+	subql	#1,_C_LABEL(intr_depth)	| exiting from interrupt
 	jra	_ASM_LABEL(rei)		| all done
 
 ENTRY_NOPROFILE(lev7intr)	/* level 7: parity errors, reset key */

Index: src/sys/arch/hp300/include/cpu.h
diff -u src/sys/arch/hp300/include/cpu.h:1.76 src/sys/arch/hp300/include/cpu.h:1.77
--- src/sys/arch/hp300/include/cpu.h:1.76	Tue Jan 16 03:44:44 2024
+++ src/sys/arch/hp300/include/cpu.h	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.76 2024/01/16 03:44:44 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.77 2024/01/19 18:18:54 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -81,7 +81,7 @@ struct clockframe {
 #else
 /* but until we start using PSL_M, we have to do this instead */
 #include <machine/intr.h>
-#define	CLKF_INTR(framep)	(idepth > 1)	/* XXX */
+#define	CLKF_INTR(framep)	(intr_depth > 1)	/* XXX */
 #endif
 
 

Index: src/sys/arch/luna68k/luna68k/locore.s
diff -u src/sys/arch/luna68k/luna68k/locore.s:1.82 src/sys/arch/luna68k/luna68k/locore.s:1.83
--- src/sys/arch/luna68k/luna68k/locore.s:1.82	Wed Jan 17 12:33:49 2024
+++ src/sys/arch/luna68k/luna68k/locore.s	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.82 2024/01/17 12:33:49 thorpej Exp $ */
+/* $NetBSD: locore.s,v 1.83 2024/01/19 18:18:54 thorpej Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -566,7 +566,7 @@ ENTRY_NOPROFILE(lev7intr)		/* Level 7: N
 
 #if 1	/* XXX wild timer -- how can I disable/enable the interrupt? */
 ENTRY_NOPROFILE(lev5intr)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	btst	#7,OBIO_CLOCK		| check whether system clock
 	beq	2f
 	movb	#1,OBIO_CLOCK		| clear the interrupt
@@ -580,12 +580,12 @@ ENTRY_NOPROFILE(lev5intr)
 	addql	#1,_C_LABEL(m68k_intr_evcnt)+CLOCK_INTRCNT
 	INTERRUPT_RESTOREREG
 1:
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		| all done
 2:
 					| XP device has also lev5 intr,
 					| routing to autovec
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jbra	_C_LABEL(intrstub_autovec)
 #endif
 

Index: src/sys/arch/m68k/include/intr.h
diff -u src/sys/arch/m68k/include/intr.h:1.6 src/sys/arch/m68k/include/intr.h:1.7
--- src/sys/arch/m68k/include/intr.h:1.6	Fri Jan 19 03:09:05 2024
+++ src/sys/arch/m68k/include/intr.h	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.6 2024/01/19 03:09:05 thorpej Exp $	*/
+/*	$NetBSD: intr.h,v 1.7 2024/01/19 18:18:54 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2023, 2024 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@ typedef struct {
 
 #ifndef _LOCORE
 
-extern volatile int idepth;		/* interrupt depth */
+extern volatile int intr_depth;		/* interrupt depth */
 extern const uint16_t ipl2psl_table[NIPL];
 
 typedef int ipl_t;		/* logical IPL_* value */
@@ -78,7 +78,7 @@ typedef int ipl_t;		/* logical IPL_* val
 static inline bool
 cpu_intr_p(void)
 {
-	return idepth != 0;
+	return intr_depth != 0;
 }
 
 static inline ipl_cookie_t

Index: src/sys/arch/m68k/m68k/m68k_intr.c
diff -u src/sys/arch/m68k/m68k/m68k_intr.c:1.11 src/sys/arch/m68k/m68k/m68k_intr.c:1.12
--- src/sys/arch/m68k/m68k/m68k_intr.c:1.11	Fri Jan 19 05:45:28 2024
+++ src/sys/arch/m68k/m68k/m68k_intr.c	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: m68k_intr.c,v 1.11 2024/01/19 05:45:28 thorpej Exp $	*/
+/*	$NetBSD: m68k_intr.c,v 1.12 2024/01/19 18:18:54 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996, 2023, 2024 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: m68k_intr.c,v 1.11 2024/01/19 05:45:28 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: m68k_intr.c,v 1.12 2024/01/19 18:18:54 thorpej Exp $");
 
 #define	_M68K_INTR_PRIVATE
 
@@ -70,7 +70,7 @@ extern char intrstub_vectored[];
 /* A dummy event counter where interrupt stats go to die. */
 static struct evcnt bitbucket;
 
-volatile int idepth;	/* updated in assembly glue */
+volatile int intr_depth;	/* updated in assembly glue */
 
 static struct m68k_intrhand_list m68k_intrhands_autovec[NAUTOVECTORS];
 #ifdef __HAVE_M68K_INTR_VECTORED

Index: src/sys/arch/m68k/m68k/m68k_intr_stubs.s
diff -u src/sys/arch/m68k/m68k/m68k_intr_stubs.s:1.3 src/sys/arch/m68k/m68k/m68k_intr_stubs.s:1.4
--- src/sys/arch/m68k/m68k/m68k_intr_stubs.s:1.3	Tue Jan 16 02:14:33 2024
+++ src/sys/arch/m68k/m68k/m68k_intr_stubs.s	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: m68k_intr_stubs.s,v 1.3 2024/01/16 02:14:33 thorpej Exp $	*/
+/*	$NetBSD: m68k_intr_stubs.s,v 1.4 2024/01/19 18:18:54 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -62,11 +62,11 @@
  */
 	INTRSTUB_ALIGN
 ENTRY_NOPROFILE(intrstub_autovec)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(m68k_intr_autovec)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 #ifdef __HAVE_M68K_INTR_VECTORED
@@ -75,10 +75,10 @@ ENTRY_NOPROFILE(intrstub_autovec)
  */
 	INTRSTUB_ALIGN
 ENTRY_NOPROFILE(intrstub_vectored)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(m68k_intr_vectored)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 #endif /* __HAVE_M68K_INTR_VECTORED */

Index: src/sys/arch/mac68k/mac68k/intr.c
diff -u src/sys/arch/mac68k/mac68k/intr.c:1.33 src/sys/arch/mac68k/mac68k/intr.c:1.34
--- src/sys/arch/mac68k/mac68k/intr.c:1.33	Wed Dec 20 00:40:43 2023
+++ src/sys/arch/mac68k/mac68k/intr.c	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.33 2023/12/20 00:40:43 thorpej Exp $	*/
+/*	$NetBSD: intr.c,v 1.34 2024/01/19 18:18:54 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.33 2023/12/20 00:40:43 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.34 2024/01/19 18:18:54 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -81,7 +81,7 @@ int	intr_debug = 0;
  * to interrupt on different levels as listed in locore.s
  */
 uint16_t ipl2psl_table[NIPL];
-int idepth;
+int intr_depth;
 volatile int ssir;
 
 extern	u_int intrcnt[];	/* from locore.s */
@@ -217,7 +217,7 @@ intr_dispatch(int evec)		/* format | vec
 {
 	int ipl, vec;
 
-	idepth++;
+	intr_depth++;
 	vec = (evec & 0xfff) >> 2;
 #ifdef DIAGNOSTIC
 	if ((vec < ISRLOC) || (vec >= (ISRLOC + NISR)))
@@ -229,7 +229,7 @@ intr_dispatch(int evec)		/* format | vec
 	curcpu()->ci_data.cpu_nintr++;
 
 	(void)(*intr_func[ipl])(intr_arg[ipl]);
-	idepth--;
+	intr_depth--;
 }
 #if __GNUC_PREREQ__(8, 0)
 #pragma GCC pop_options
@@ -242,10 +242,10 @@ static int
 intr_noint(void *arg)
 {
 #ifdef DEBUG
-	idepth++;
+	intr_depth++;
 	if (intr_debug)
 		printf("intr_noint: ipl %d\n", (int)arg);
-	idepth--;
+	intr_depth--;
 #endif
 	return 0;
 }
@@ -254,5 +254,5 @@ bool
 cpu_intr_p(void)
 {
 
-	return idepth != 0;
+	return intr_depth != 0;
 }

Index: src/sys/arch/mvme68k/include/cpu.h
diff -u src/sys/arch/mvme68k/include/cpu.h:1.55 src/sys/arch/mvme68k/include/cpu.h:1.56
--- src/sys/arch/mvme68k/include/cpu.h:1.55	Thu Jan 18 14:39:07 2024
+++ src/sys/arch/mvme68k/include/cpu.h	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.55 2024/01/18 14:39:07 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.56 2024/01/19 18:18:54 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -72,7 +72,7 @@ struct clockframe {
  * (Remember, the clock interrupt handler itself will cause the
  * depth counter to be incremented).
  */
-#define	CLKF_INTR(framep)	(idepth > 1)
+#define	CLKF_INTR(framep)	(intr_depth > 1)
 
 /*
  * Preempt the current process if in interrupt from user mode,

Index: src/sys/arch/mvme68k/mvme68k/trap.c
diff -u src/sys/arch/mvme68k/mvme68k/trap.c:1.115 src/sys/arch/mvme68k/mvme68k/trap.c:1.116
--- src/sys/arch/mvme68k/mvme68k/trap.c:1.115	Tue Jan 16 01:26:34 2024
+++ src/sys/arch/mvme68k/mvme68k/trap.c	Fri Jan 19 18:18:54 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.115 2024/01/16 01:26:34 thorpej Exp $	*/
+/*	$NetBSD: trap.c,v 1.116 2024/01/19 18:18:54 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.115 2024/01/16 01:26:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.116 2024/01/19 18:18:54 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -564,7 +564,7 @@ trap(struct frame *fp, int type, unsigne
 		}
 
 #ifdef DIAGNOSTIC
-		if (idepth && !panicking) {
+		if (intr_depth && !panicking) {
 			printf("trap: calling uvm_fault() from interrupt!\n");
 			goto dopanic;
 		}

Index: src/sys/arch/news68k/include/cpu.h
diff -u src/sys/arch/news68k/include/cpu.h:1.53 src/sys/arch/news68k/include/cpu.h:1.54
--- src/sys/arch/news68k/include/cpu.h:1.53	Thu Jan 18 14:39:07 2024
+++ src/sys/arch/news68k/include/cpu.h	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.53 2024/01/18 14:39:07 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.54 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -97,7 +97,7 @@ struct clockframe {
 #else
 /* but until we start using PSL_M, we have to do this instead */
 #include <machine/intr.h>
-#define CLKF_INTR(framep)	(idepth > 1)	/* XXX */
+#define CLKF_INTR(framep)	(intr_depth > 1)	/* XXX */
 #endif
 
 

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.85 src/sys/arch/news68k/news68k/locore.s:1.86
--- src/sys/arch/news68k/news68k/locore.s:1.85	Wed Jan 17 12:33:50 2024
+++ src/sys/arch/news68k/news68k/locore.s	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.85 2024/01/17 12:33:50 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.86 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -647,14 +647,14 @@ Lbrkpt3:
  */
 
 ENTRY_NOPROFILE(lev1intr)		/* Level 1: AST interrupt */
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	CPUINFO_INCREMENT(CI_NINTR)
 	addql	#1,_C_LABEL(m68k_intr_evcnt)+AST_INTRCNT
 	movl	_C_LABEL(ctrl_ast),%a0
 	clrb	%a0@			| disable AST interrupt
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		| handle AST
 
 #ifdef notyet
@@ -666,27 +666,27 @@ ENTRY_NOPROFILE(_softintr)		/* Level 2: 
 #endif
 
 ENTRY_NOPROFILE(lev3intr)		/* Level 3: fd, lpt, vme etc. */
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(intrhand_lev3)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	rte
 
 ENTRY_NOPROFILE(lev4intr)		/* Level 4: scsi, le, vme etc. */
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(intrhand_lev4)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	rte
 
 ENTRY_NOPROFILE(_isr_clock)		/* Level 6: clock (see clock_hb.c) */
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	jbsr	_C_LABEL(clock_intr)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	rte
 
 #if 0

Index: src/sys/arch/next68k/include/cpu.h
diff -u src/sys/arch/next68k/include/cpu.h:1.56 src/sys/arch/next68k/include/cpu.h:1.57
--- src/sys/arch/next68k/include/cpu.h:1.56	Thu Jan 18 14:39:07 2024
+++ src/sys/arch/next68k/include/cpu.h	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.56 2024/01/18 14:39:07 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.57 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -77,7 +77,7 @@ struct clockframe {
  * (Remember, the clock interrupt handler itself will cause the
  * depth counter to be incremented).
  */
-#define	CLKF_INTR(framep)	(idepth > 1)
+#define	CLKF_INTR(framep)	(intr_depth > 1)
 
 /*
  * Preempt the current process if in interrupt from user mode,

Index: src/sys/arch/next68k/next68k/trap.c
diff -u src/sys/arch/next68k/next68k/trap.c:1.95 src/sys/arch/next68k/next68k/trap.c:1.96
--- src/sys/arch/next68k/next68k/trap.c:1.95	Tue Jan 16 00:34:58 2024
+++ src/sys/arch/next68k/next68k/trap.c	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.95 2024/01/16 00:34:58 thorpej Exp $	*/
+/*	$NetBSD: trap.c,v 1.96 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * This file was taken from mvme68k/mvme68k/trap.c
@@ -46,7 +46,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.95 2024/01/16 00:34:58 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.96 2024/01/19 18:18:55 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -555,7 +555,7 @@ trap(struct frame *fp, int type, unsigne
 		}
 
 #ifdef DIAGNOSTIC
-		if (idepth && !panicking) {
+		if (intr_depth && !panicking) {
 			printf("trap: calling uvm_fault() from interrupt!\n");
 			goto dopanic;
 		}

Index: src/sys/arch/sun2/sun2/clock.c
diff -u src/sys/arch/sun2/sun2/clock.c:1.17 src/sys/arch/sun2/sun2/clock.c:1.18
--- src/sys/arch/sun2/sun2/clock.c:1.17	Sun Jan 14 17:51:16 2024
+++ src/sys/arch/sun2/sun2/clock.c	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.17 2024/01/14 17:51:16 thorpej Exp $	*/
+/*	$NetBSD: clock.c,v 1.18 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.17 2024/01/14 17:51:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.18 2024/01/19 18:18:55 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -299,7 +299,7 @@ void
 clock_intr(struct clockframe cf)
 {
 
-	idepth++;
+	intr_depth++;
 
 	/* Read the clock interrupt register. */
 	am9513_write_clk_cmd(AM9513_CMD_CLEAR_OUTPUT(SUN2_CLK_TIMER));
@@ -316,7 +316,7 @@ clock_intr(struct clockframe cf)
 	/* Call common clock interrupt handler. */
 	hardclock(&cf);
 
-	idepth--;
+	intr_depth--;
 
 	ATOMIC_CAS_CHECK(&cf);
 }

Index: src/sys/arch/sun3/sun3/clock.c
diff -u src/sys/arch/sun3/sun3/clock.c:1.68 src/sys/arch/sun3/sun3/clock.c:1.69
--- src/sys/arch/sun3/sun3/clock.c:1.68	Mon Jan 15 18:47:03 2024
+++ src/sys/arch/sun3/sun3/clock.c	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.68 2024/01/15 18:47:03 thorpej Exp $	*/
+/*	$NetBSD: clock.c,v 1.69 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.68 2024/01/15 18:47:03 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.69 2024/01/19 18:18:55 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -304,7 +304,7 @@ void
 clock_intr(struct clockframe cf)
 {
 
-	idepth++;
+	intr_depth++;
 
 	/* Read the clock interrupt register. */
 	intersil_clear();
@@ -330,5 +330,5 @@ clock_intr(struct clockframe cf)
 	/* Call common clock interrupt handler. */
 	hardclock(&cf);
 
-	idepth--;
+	intr_depth--;
 }

Index: src/sys/arch/sun3/sun3x/clock.c
diff -u src/sys/arch/sun3/sun3x/clock.c:1.44 src/sys/arch/sun3/sun3x/clock.c:1.45
--- src/sys/arch/sun3/sun3x/clock.c:1.44	Mon Jan 15 18:47:03 2024
+++ src/sys/arch/sun3/sun3x/clock.c	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.44 2024/01/15 18:47:03 thorpej Exp $	*/
+/*	$NetBSD: clock.c,v 1.45 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990, 1993
@@ -95,7 +95,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.44 2024/01/15 18:47:03 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.45 2024/01/19 18:18:55 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -421,7 +421,7 @@ clock_intr(struct clockframe cf)
 {
 	extern char _Idle[];	/* locore.s */
 
-	idepth++;
+	intr_depth++;
 
 #ifdef	SUN3_470
 	if (intersil_va) {
@@ -450,5 +450,5 @@ clock_intr(struct clockframe cf)
 	/* Call common clock interrupt handler. */
 	hardclock(&cf);
 
-	idepth--;
+	intr_depth--;
 }

Index: src/sys/arch/sun68k/include/cpu.h
diff -u src/sys/arch/sun68k/include/cpu.h:1.26 src/sys/arch/sun68k/include/cpu.h:1.27
--- src/sys/arch/sun68k/include/cpu.h:1.26	Sun Nov 24 15:53:47 2019
+++ src/sys/arch/sun68k/include/cpu.h	Fri Jan 19 18:18:55 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.26 2019/11/24 15:53:47 ad Exp $	*/
+/*	$NetBSD: cpu.h,v 1.27 2024/01/19 18:18:55 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -122,7 +122,7 @@ struct clockframe {
 #else
 /* but until we start using PSL_M, we have to do this instead */
 #include <machine/intr.h>
-#define	CLKF_INTR(framep)	(idepth > 1)	/* XXX */
+#define	CLKF_INTR(framep)	(intr_depth > 1)	/* XXX */
 #endif
 
 extern int astpending;	 /* need to trap before returning to user mode */

Index: src/sys/arch/x68k/x68k/locore.s
diff -u src/sys/arch/x68k/x68k/locore.s:1.131 src/sys/arch/x68k/x68k/locore.s:1.132
--- src/sys/arch/x68k/x68k/locore.s:1.131	Wed Jan 17 12:33:51 2024
+++ src/sys/arch/x68k/x68k/locore.s	Fri Jan 19 18:18:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.131 2024/01/17 12:33:51 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.132 2024/01/19 18:18:56 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -636,14 +636,14 @@ ENTRY_NOPROFILE(kbdtimer)
 	rte
 
 ENTRY_NOPROFILE(intiotrap)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 	pea	%sp@(16-(FR_HW))	| XXX
 	jbsr	_C_LABEL(intio_intr)
 	addql	#4,%sp
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	rei
 
 ENTRY_NOPROFILE(lev1intr)
@@ -652,7 +652,7 @@ ENTRY_NOPROFILE(lev3intr)
 ENTRY_NOPROFILE(lev4intr)
 ENTRY_NOPROFILE(lev5intr)
 ENTRY_NOPROFILE(lev6intr)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG
 Lnotdma:
 	lea	_C_LABEL(intrcnt),%a0
@@ -665,11 +665,11 @@ Lnotdma:
 	addql	#4,%sp			| pop SR
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)
 
 ENTRY_NOPROFILE(timertrap)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	INTERRUPT_SAVEREG		| save scratch registers
 	addql	#1,_C_LABEL(intrcnt)+32	| count hardclock interrupts
 	lea	%sp@(16),%a1		| a1 = &clockframe
@@ -678,11 +678,11 @@ ENTRY_NOPROFILE(timertrap)
 	addql	#4,%sp
 	CPUINFO_INCREMENT(CI_NINTR)	| chalk up another interrupt
 	INTERRUPT_RESTOREREG		| restore scratch registers
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		| all done
 
 ENTRY_NOPROFILE(lev7intr)
-	addql	#1,_C_LABEL(idepth)
+	addql	#1,_C_LABEL(intr_depth)
 	addql	#1,_C_LABEL(intrcnt)+28
 	clrl	%sp@-
 	moveml	#0xFFFF,%sp@-		| save registers
@@ -693,7 +693,7 @@ ENTRY_NOPROFILE(lev7intr)
 	movl	%a0,%usp		|   user SP
 	moveml	%sp@+,#0x7FFF		| and remaining registers
 	addql	#8,%sp			| pop SP and stack adjust
-	subql	#1,_C_LABEL(idepth)
+	subql	#1,_C_LABEL(intr_depth)
 	jra	_ASM_LABEL(rei)		| all done
 
 /*

Index: src/sys/arch/x68k/x68k/machdep.c
diff -u src/sys/arch/x68k/x68k/machdep.c:1.211 src/sys/arch/x68k/x68k/machdep.c:1.212
--- src/sys/arch/x68k/x68k/machdep.c:1.211	Wed Dec 20 00:40:44 2023
+++ src/sys/arch/x68k/x68k/machdep.c	Fri Jan 19 18:18:56 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.211 2023/12/20 00:40:44 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.212 2024/01/19 18:18:56 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211 2023/12/20 00:40:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.212 2024/01/19 18:18:56 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -1239,13 +1239,13 @@ setmemrange(void)
 #endif
 }
 
-int idepth;
+int intr_depth;
 
 bool
 cpu_intr_p(void)
 {
 
-	return idepth != 0;
+	return intr_depth != 0;
 }
 
 int

Reply via email to