Module Name: src
Committed By: martin
Date: Sat Feb 22 13:10:17 UTC 2025
Modified Files:
src/sys/arch/evbppc/wii [netbsd-10]: pic_pi.c
Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1064):
sys/arch/evbppc/wii/pic_pi.c: revision 1.3
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.1.2.3 -r1.1.2.4 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.1.2.3 src/sys/arch/evbppc/wii/pic_pi.c:1.1.2.4
--- src/sys/arch/evbppc/wii/pic_pi.c:1.1.2.3 Sat Feb 22 12:39:04 2025
+++ src/sys/arch/evbppc/wii/pic_pi.c Sat Feb 22 13:10:17 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: pic_pi.c,v 1.1.2.3 2025/02/22 12:39:04 martin Exp $ */
+/* $NetBSD: pic_pi.c,v 1.1.2.4 2025/02/22 13:10:17 martin 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.1.2.3 2025/02/22 12:39:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_pi.c,v 1.1.2.4 2025/02/22 13:10:17 martin 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;
}