Module Name:src
Committed By: tsutsui
Date: Wed Aug 30 17:10:17 UTC 2023
Modified Files:
src/sys/arch/arc/arc: autoconf.c interrupt.c timer.c timervar.h
Log Message:
Remove ENABLE_INT5_STATCLOCK broken since matt-nb5-mips64 merge.
Noticed by andvar@.
To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/arc/arc/autoconf.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/arc/arc/interrupt.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arc/arc/timer.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/arc/arc/timervar.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/arc/arc/autoconf.c
diff -u src/sys/arch/arc/arc/autoconf.c:1.35 src/sys/arch/arc/arc/autoconf.c:1.36
--- src/sys/arch/arc/arc/autoconf.c:1.35 Sat Oct 27 17:17:35 2012
+++ src/sys/arch/arc/arc/autoconf.c Wed Aug 30 17:10:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.35 2012/10/27 17:17:35 chs Exp $ */
+/* $NetBSD: autoconf.c,v 1.36 2023/08/30 17:10:17 tsutsui Exp $ */
/* $OpenBSD: autoconf.c,v 1.9 1997/05/18 13:45:20 pefo Exp $ */
/*
@@ -88,7 +88,7 @@
*/
#include
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.35 2012/10/27 17:17:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.36 2023/08/30 17:10:17 tsutsui Exp $");
#include
#include
@@ -131,28 +131,14 @@ void
cpu_configure(void)
{
-#ifdef ENABLE_INT5_STATCLOCK
- evcnt_attach_static(&statclock_ev);
-#endif
-
(void)splhigh(); /* To be really sure.. */
if (config_rootfound("mainbus", NULL) == NULL)
panic("no mainbus found");
/* Configuration is finished, turn on interrupts. */
-#ifdef ENABLE_INT5_STATCLOCK
- /*
- * Enable interrupt sources.
- * We can't enable CPU INT5 which is used by statclock(9) here
- * until cpu_initclocks(9) is called because there is no way
- * to disable it other than setting status register by spl(9).
- */
- _spllower(MIPS_INT_MASK_5);
-#error need fix
-#else
+
/* enable all source forcing SOFT_INTs cleared */
spl0();
-#endif
}
#if defined(NFS_BOOT_BOOTP) || defined(NFS_BOOT_DHCP)
Index: src/sys/arch/arc/arc/interrupt.c
diff -u src/sys/arch/arc/arc/interrupt.c:1.9 src/sys/arch/arc/arc/interrupt.c:1.10
--- src/sys/arch/arc/arc/interrupt.c:1.9 Wed Mar 2 10:51:04 2011
+++ src/sys/arch/arc/arc/interrupt.c Wed Aug 30 17:10:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.9 2011/03/02 10:51:04 tsutsui Exp $ */
+/* $NetBSD: interrupt.c,v 1.10 2023/08/30 17:10:17 tsutsui Exp $ */
/* $OpenBSD: trap.c,v 1.22 1999/05/24 23:08:59 jason Exp $ */
/*
@@ -40,7 +40,7 @@
*/
#include
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.9 2011/03/02 10:51:04 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2023/08/30 17:10:17 tsutsui Exp $");
#include
#include
@@ -65,11 +65,6 @@ static struct cpu_inttab cpu_int_tab[ARC
uint32_t cpu_int_mask; /* External cpu interrupt mask */
-#ifdef ENABLE_INT5_STATCLOCK
-struct evcnt statclock_ev =
-EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "cpu", "statclock");
-#endif
-
/*
* Set up handler for external interrupt events.
* Events are checked in priority order.
@@ -114,17 +109,11 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s
while (ppl < (ipl = splintr(&ipending))) {
/* check MIPS3 internal clock interrupt */
if (ipending & MIPS_INT_MASK_5) {
-#ifdef ENABLE_INT5_STATCLOCK
- /* call statclock(9) handler */
- statclockintr(&cf);
- statclock_ev.ev_count++;
-#else
/*
* Writing a value to the Compare register, as a side
* effect, clears the timer interrupt request.
*/
mips3_cp0_compare_write(0);
-#endif
}
/*
Index: src/sys/arch/arc/arc/timer.c
diff -u src/sys/arch/arc/arc/timer.c:1.11 src/sys/arch/arc/arc/timer.c:1.12
--- src/sys/arch/arc/arc/timer.c:1.11 Sat Oct 27 17:17:35 2012
+++ src/sys/arch/arc/arc/timer.c Wed Aug 30 17:10:17 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.c,v 1.11 2012/10/27 17:17:35 chs Exp $ */
+/* $NetBSD: timer.c,v 1.12 2023/08/30 17:10:17 tsutsui Exp $ */
/* NetBSD: clock.c,v 1.31 2001/05/27 13:53:24 sommerfeld Exp */
/*
@@ -40,7 +40,7 @@
*/
#include
-__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.11 2012/10/27 17:17:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer.c,v 1.12 2023/08/30 17:10:17 tsutsui Exp $");
#include
#include
@@ -56,22 +56,6 @@ const struct timerfns *timerfns;
int timerinitted;
uint32_t last_cp0_count;
-#ifdef ENABLE_INT5_STATCLOCK
-/*
- * Statistics clock variance, in usec. Variance must be a
- * power of two. Since this gives us an even number, not an odd number,
- * we discard one case and compensate. That is, a variance of 1024 would
- * give us offsets in [0..1023]. Instead, we take offsets in [1..1023].
- * This is symmetric about the point 512, or statvar/2, and thus averages
- * to that value (assuming uniform random numbers).
- */
-static const uint32_t statvar = 1024;
-static uint32_t statint; /* number of clock ticks for stathz */