Module Name: src Committed By: mlelstv Date: Fri Nov 1 14:28:08 UTC 2024
Modified Files: src/sys/arch/virt68k/virt68k: intr.c Log Message: Catch stray interrupts. The message reports the CPU interrupt level. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/virt68k/virt68k/intr.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/virt68k/virt68k/intr.c diff -u src/sys/arch/virt68k/virt68k/intr.c:1.3 src/sys/arch/virt68k/virt68k/intr.c:1.4 --- src/sys/arch/virt68k/virt68k/intr.c:1.3 Fri Jan 19 05:46:36 2024 +++ src/sys/arch/virt68k/virt68k/intr.c Fri Nov 1 14:28:08 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.3 2024/01/19 05:46:36 thorpej Exp $ */ +/* $NetBSD: intr.c,v 1.4 2024/11/01 14:28:08 mlelstv Exp $ */ /*- * Copyright (c) 1996, 2023 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.3 2024/01/19 05:46:36 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.4 2024/11/01 14:28:08 mlelstv Exp $"); #define _VIRT68K_INTR_PRIVATE @@ -279,6 +279,11 @@ intr_dispatch(struct clockframe frame) return; } + if (pics[pic] == NULL) { + printf("Interrupt without a cause on CPU ipl %d\n", ipl); + return; + } + const int base = pic * NIRQ_PER_PIC; struct intrhand *ih; bool rv = false; @@ -293,7 +298,7 @@ intr_dispatch(struct clockframe frame) } } if (!rv) { - printf("Spurious interrupt on CPU irq %d\n", ipl); + printf("Spurious interrupt on CPU ipl %d\n", ipl); } }