Module Name: src
Committed By: thorpej
Date: Sun Jan 14 00:00:58 UTC 2024
Modified Files:
src/sys/arch/sun68k/sun68k: isr.c
Log Message:
Use NAUTOVECTORS and NUSERVECTORS constants from <m68k/vectors.h>
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 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/sun68k/sun68k/isr.c
diff -u src/sys/arch/sun68k/sun68k/isr.c:1.29 src/sys/arch/sun68k/sun68k/isr.c:1.30
--- src/sys/arch/sun68k/sun68k/isr.c:1.29 Sat Jan 13 18:51:38 2024
+++ src/sys/arch/sun68k/sun68k/isr.c Sun Jan 14 00:00:58 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: isr.c,v 1.29 2024/01/13 18:51:38 thorpej Exp $ */
+/* $NetBSD: isr.c,v 1.30 2024/01/14 00:00:58 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.29 2024/01/13 18:51:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.30 2024/01/14 00:00:58 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -52,8 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.29
extern int intrcnt[]; /* statistics */
-#define NUM_LEVELS 8
-
struct isr {
struct isr *isr_next;
isr_func_t isr_intr;
@@ -78,12 +76,11 @@ 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[NUM_LEVELS];
+static struct isr *isr_autovec_list[NAUTOVECTORS];
/*
* This is called by the assembly routines
@@ -136,7 +133,7 @@ isr_add_autovect(isr_func_t handler, voi
{
struct isr *new_isr;
- if ((level < 0) || (level >= NUM_LEVELS))
+ if ((level < 0) || (level >= NAUTOVECTORS))
panic("isr_add: bad level=%d", level);
new_isr = kmem_alloc(sizeof(struct isr), KM_SLEEP);
new_isr->isr_intr = handler;
@@ -150,7 +147,7 @@ struct vector_handler {
isr_func_t func;
void *arg;
};
-static struct vector_handler isr_vector_handlers[192];
+static struct vector_handler isr_vector_handlers[NUSERVECTORS];
/*
* This is called by the assembly glue