Module Name:    src
Committed By:   thorpej
Date:           Mon Jan 15 19:11:31 UTC 2024

Modified Files:
        src/sys/arch/cesfic/cesfic: genassym.cf locore.s
        src/sys/arch/cesfic/include: intr.h types.h

Log Message:
G/C __HAVE_LEGACY_INTRCNT from cesfic.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cesfic/cesfic/genassym.cf
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/cesfic/cesfic/locore.s
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/cesfic/include/intr.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cesfic/include/types.h

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/cesfic/cesfic/genassym.cf
diff -u src/sys/arch/cesfic/cesfic/genassym.cf:1.21 src/sys/arch/cesfic/cesfic/genassym.cf:1.22
--- src/sys/arch/cesfic/cesfic/genassym.cf:1.21	Tue Jan  9 04:16:24 2024
+++ src/sys/arch/cesfic/cesfic/genassym.cf	Mon Jan 15 19:11:31 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.21 2024/01/09 04:16:24 thorpej Exp $
+#	$NetBSD: genassym.cf,v 1.22 2024/01/15 19:11:31 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -38,6 +38,7 @@ include <sys/mbuf.h>
 include <sys/msgbuf.h>
 include <sys/syscall.h>
 include <sys/device.h>
+include <sys/intr.h>
 
 include <uvm/uvm_extern.h>
 
@@ -104,8 +105,14 @@ define	P_FLAG			offsetof(struct proc, p_
 define	P_RASLIST		offsetof(struct proc, p_raslist)
 define	P_VMSPACE		offsetof(struct proc, p_vmspace)
 
+# event counter
+define	EVCNT_COUNT		offsetof(struct evcnt, ev_count)
+
 # interrupt/fault metering
 define	CI_NINTR		offsetof(struct cpu_info, ci_data.cpu_nintr)
+define	SPUR_INTRCNT		((sizeof(struct evcnt)*0) + offsetof(struct evcnt, ev_count32))
+define	CLOCK_INTRCNT		((sizeof(struct evcnt)*6) + offsetof(struct evcnt, ev_count32))
+define	NMI_INTRCNT		((sizeof(struct evcnt)*7) + offsetof(struct evcnt, ev_count32))
 
 # PSL values (should just include psl.h?)
 define	PSL_S			PSL_S
@@ -175,6 +182,3 @@ define	SYS_compat_13_sigreturn13 SYS_com
 # errno
 define	EFAULT			EFAULT
 define	ENAMETOOLONG		ENAMETOOLONG
-
-# event counter
-define	EVCNT_COUNT		offsetof(struct evcnt, ev_count)

Index: src/sys/arch/cesfic/cesfic/locore.s
diff -u src/sys/arch/cesfic/cesfic/locore.s:1.41 src/sys/arch/cesfic/cesfic/locore.s:1.42
--- src/sys/arch/cesfic/cesfic/locore.s:1.41	Mon Jan 15 03:07:14 2024
+++ src/sys/arch/cesfic/cesfic/locore.s	Mon Jan 15 19:11:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.41 2024/01/15 03:07:14 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.42 2024/01/15 19:11:31 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -607,7 +607,7 @@ Lbrkpt2:
  */
 
 ENTRY_NOPROFILE(spurintr)	/* level 0 */
-	addql	#1,_C_LABEL(intrcnt)+0
+	addql	#1,_C_LABEL(m68k_intr_evcnt)+SPUR_INTRCNT
 	INTERRUPT_SAVEREG
 	CPUINFO_INCREMENT(CI_NINTR)
 	INTERRUPT_RESTOREREG
@@ -621,7 +621,7 @@ ENTRY_NOPROFILE(lev6intr)	/* Level 6: cl
 	movl %d0, %a0@
 	btst #2, %d0
 	jeq 1f
-	addql	#1,_C_LABEL(intrcnt)+24
+	addql	#1,_C_LABEL(m68k_intr_evcnt)+CLOCK_INTRCNT
 	lea	%sp@(0), %a1		| a1 = &clockframe
 	movl	%a1, %sp@-
 	jbsr	_C_LABEL(hardclock)	| hardclock(&frame)
@@ -636,7 +636,7 @@ ENTRY_NOPROFILE(lev6intr)	/* Level 6: cl
 	jra	_ASM_LABEL(rei)		| all done
 
 ENTRY_NOPROFILE(lev7intr)	/* level 7: parity errors, reset key */
-	addql	#1,_C_LABEL(intrcnt)+28
+	addql	#1,_C_LABEL(m68k_intr_evcnt)+NMI_INTRCNT
 	clrl	%sp@-
 	moveml	#0xFFFF,%sp@-		| save registers
 	movl	%usp,%a0			| and save
@@ -844,19 +844,3 @@ fulltflush:
 fullcflush:
 	.long	0
 #endif
-
-/* interrupt counters */
-GLOBAL(intrnames)
-	.asciz	"spur"
-	.asciz	"lev1"
-	.asciz	"lev2"
-	.asciz	"lev3"
-	.asciz	"lev4"
-	.asciz	"lev5"
-	.asciz	"clock"
-	.asciz	"nmi"
-GLOBAL(eintrnames)
-	.even
-GLOBAL(intrcnt)
-	.long	0,0,0,0,0,0,0,0
-GLOBAL(eintrcnt)

Index: src/sys/arch/cesfic/include/intr.h
diff -u src/sys/arch/cesfic/include/intr.h:1.16 src/sys/arch/cesfic/include/intr.h:1.17
--- src/sys/arch/cesfic/include/intr.h:1.16	Mon Jan 15 03:07:14 2024
+++ src/sys/arch/cesfic/include/intr.h	Mon Jan 15 19:11:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.16 2024/01/15 03:07:14 thorpej Exp $	*/
+/*	$NetBSD: intr.h,v 1.17 2024/01/15 19:11:31 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -41,6 +41,9 @@
 #define	MACHINE_PSL_IPL_VM		PSL_IPL4
 #define	MACHINE_PSL_IPL_SCHED		PSL_IPL6
 
+#define	MACHINE_INTREVCNT_NAMES						\
+	{ "spur", "lev1", "lev2", "lev3", "lev4", "lev5", "clock", "nmi" }
+
 #include <m68k/intr.h>
 
 #endif	/* _LUNA68K_INTR_H */

Index: src/sys/arch/cesfic/include/types.h
diff -u src/sys/arch/cesfic/include/types.h:1.7 src/sys/arch/cesfic/include/types.h:1.8
--- src/sys/arch/cesfic/include/types.h:1.7	Thu Apr  1 04:43:00 2021
+++ src/sys/arch/cesfic/include/types.h	Mon Jan 15 19:11:31 2024
@@ -1,5 +1,3 @@
-/* $NetBSD: types.h,v 1.7 2021/04/01 04:43:00 simonb Exp $ */
+/* $NetBSD: types.h,v 1.8 2024/01/15 19:11:31 thorpej Exp $ */
 
 #include <m68k/types.h>
-
-#define	__HAVE_LEGACY_INTRCNT

Reply via email to