Module Name: src
Committed By: jmcneill
Date: Sun Feb 16 12:45:25 UTC 2025
Modified Files:
src/sys/arch/evbppc/wii: pic_pi.c
Log Message:
wii: Fix missed interrupt bug.
Apparently reading INTSR clears the pending status. So only read this for
mode PIC_GET_IRQ.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbppc/wii/pic_pi.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/evbppc/wii/pic_pi.c
diff -u src/sys/arch/evbppc/wii/pic_pi.c:1.2 src/sys/arch/evbppc/wii/pic_pi.c:1.3
--- src/sys/arch/evbppc/wii/pic_pi.c:1.2 Sat Feb 15 00:31:42 2025
+++ src/sys/arch/evbppc/wii/pic_pi.c Sun Feb 16 12:45:25 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: pic_pi.c,v 1.2 2025/02/15 00:31:42 jmcneill Exp $ */
+/* $NetBSD: pic_pi.c,v 1.3 2025/02/16 12:45:25 jmcneill Exp $ */
/*-
* Copyright (c) 2024 Jared McNeill <[email protected]>
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pic_pi.c,v 1.2 2025/02/15 00:31:42 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_pi.c,v 1.3 2025/02/16 12:45:25 jmcneill Exp $");
#include <sys/param.h>
#include <sys/intr.h>
@@ -65,10 +65,12 @@ pi_disable_irq(struct pic_ops *pic, int
static int
pi_get_irq(struct pic_ops *pic, int mode)
{
- uint32_t pend;
+ static uint32_t pend;
int irq;
- pend = RD4(PI_INTSR) & RD4(PI_INTMR);
+ if (mode == PIC_GET_IRQ) {
+ pend = RD4(PI_INTSR) & RD4(PI_INTMR);
+ }
if (pend == 0) {
return 255;
}