Module Name: src Committed By: thorpej Date: Sun Jan 14 17:51:16 UTC 2024
Modified Files: 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: intr.h src/sys/arch/sun68k/sun68k: isr.c Log Message: Don't bother with isr_add_custom(). It's just a thin wrapper around vec_set_entry(), so just use vec_set_entry() directly. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/sun2/sun2/clock.c cvs rdiff -u -r1.65 -r1.66 src/sys/arch/sun3/sun3/clock.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sun3/sun3x/clock.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sun68k/include/intr.h cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sun68k/sun68k/isr.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/sun2/sun2/clock.c diff -u src/sys/arch/sun2/sun2/clock.c:1.16 src/sys/arch/sun2/sun2/clock.c:1.17 --- src/sys/arch/sun2/sun2/clock.c:1.16 Thu Jan 28 14:10:54 2010 +++ src/sys/arch/sun2/sun2/clock.c Sun Jan 14 17:51:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.16 2010/01/28 14:10:54 mbalmer Exp $ */ +/* $NetBSD: clock.c,v 1.17 2024/01/14 17:51:16 thorpej Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -85,7 +85,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.16 2010/01/28 14:10:54 mbalmer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.17 2024/01/14 17:51:16 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -97,6 +97,7 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1. #include <machine/cpu.h> #include <machine/frame.h> #include <machine/leds.h> +#include <machine/vectors.h> #include <sun2/sun2/control.h> #include <sun2/sun2/enable.h> @@ -268,7 +269,7 @@ cpu_initclocks(void) s = splhigh(); /* Install isr (in locore.s) that calls clock_intr(). */ - isr_add_custom(5, (void*)_isr_clock); + vec_set_entry(VECI_INTRAV0 + 5, _isr_clock); /* Now enable the clock at level 5 in the interrupt reg. */ set_clk_mode(0, 1); Index: src/sys/arch/sun3/sun3/clock.c diff -u src/sys/arch/sun3/sun3/clock.c:1.65 src/sys/arch/sun3/sun3/clock.c:1.66 --- src/sys/arch/sun3/sun3/clock.c:1.65 Fri Apr 2 12:11:41 2021 +++ src/sys/arch/sun3/sun3/clock.c Sun Jan 14 17:51:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.65 2021/04/02 12:11:41 rin Exp $ */ +/* $NetBSD: clock.c,v 1.66 2024/01/14 17:51:16 thorpej Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -83,7 +83,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.65 2021/04/02 12:11:41 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.66 2024/01/14 17:51:16 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -99,6 +99,7 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1. #include <machine/bus.h> #include <machine/cpu.h> #include <machine/leds.h> +#include <machine/vectors.h> #include <sun3/sun3/control.h> #include <sun3/sun3/interreg.h> @@ -274,7 +275,7 @@ cpu_initclocks(void) s = splhigh(); /* Install isr (in locore.s) that calls clock_intr(). */ - isr_add_custom(CLOCK_PRI, (void *)_isr_clock); + vec_set_entry(VECI_INTRAV0 + CLOCK_PRI, (void *)_isr_clock); /* Now enable the clock at level 5 in the interrupt reg. */ set_clk_mode(IREG_CLOCK_ENAB_5, 0, 1); Index: src/sys/arch/sun3/sun3x/clock.c diff -u src/sys/arch/sun3/sun3x/clock.c:1.41 src/sys/arch/sun3/sun3x/clock.c:1.42 --- src/sys/arch/sun3/sun3x/clock.c:1.41 Fri Apr 2 12:11:41 2021 +++ src/sys/arch/sun3/sun3x/clock.c Sun Jan 14 17:51:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.41 2021/04/02 12:11:41 rin Exp $ */ +/* $NetBSD: clock.c,v 1.42 2024/01/14 17:51:16 thorpej Exp $ */ /* * Copyright (c) 1982, 1990, 1993 @@ -95,7 +95,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.41 2021/04/02 12:11:41 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.42 2024/01/14 17:51:16 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -112,6 +112,7 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1. #include <machine/cpu.h> #include <machine/idprom.h> #include <machine/leds.h> +#include <machine/vectors.h> #include <dev/clock_subr.h> #include <dev/ic/intersil7170reg.h> @@ -387,7 +388,7 @@ cpu_initclocks(void) s = splhigh(); /* Install isr (in locore.s) that calls clock_intr(). */ - isr_add_custom(CLOCK_PRI, (void *)_isr_clock); + vec_set_entry(VECI_INTRAV0 + CLOCK_PRI, (void *)_isr_clock); /* Now enable the clock at level 5 in the interrupt reg. */ set_clk_mode(IREG_CLOCK_ENAB_5, 0, 1); Index: src/sys/arch/sun68k/include/intr.h diff -u src/sys/arch/sun68k/include/intr.h:1.22 src/sys/arch/sun68k/include/intr.h:1.23 --- src/sys/arch/sun68k/include/intr.h:1.22 Fri Jan 12 23:36:30 2024 +++ src/sys/arch/sun68k/include/intr.h Sun Jan 14 17:51:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.22 2024/01/12 23:36:30 thorpej Exp $ */ +/* $NetBSD: intr.h,v 1.23 2024/01/14 17:51:16 thorpej Exp $ */ /* * Copyright (c) 2001 Matt Fredette. @@ -94,7 +94,6 @@ splraiseipl(ipl_cookie_t icookie) typedef int (*isr_func_t)(void *); void isr_add_autovect(isr_func_t, void *, int); void isr_add_vectored(isr_func_t, void *, int, int); -void isr_add_custom(int, void *); /* * Define inline functions for PSL manipulation. Index: src/sys/arch/sun68k/sun68k/isr.c diff -u src/sys/arch/sun68k/sun68k/isr.c:1.30 src/sys/arch/sun68k/sun68k/isr.c:1.31 --- src/sys/arch/sun68k/sun68k/isr.c:1.30 Sun Jan 14 00:00:58 2024 +++ src/sys/arch/sun68k/sun68k/isr.c Sun Jan 14 17:51:16 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: isr.c,v 1.30 2024/01/14 00:00:58 thorpej Exp $ */ +/* $NetBSD: isr.c,v 1.31 2024/01/14 17:51:16 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.30 2024/01/14 00:00:58 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.31 2024/01/14 17:51:16 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -73,13 +73,6 @@ int idepth; void isr_autovec (struct clockframe); void isr_vectored(struct clockframe); -void -isr_add_custom(int level, void *handler) -{ - vec_set_entry(VECI_INTRAV0 + level, handler); -} - - static struct isr *isr_autovec_list[NAUTOVECTORS]; /*