Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/macppc Fix from Nozomu Ando to ensure that r...
details: https://anonhg.NetBSD.org/src/rev/cba38677e999
branches: trunk
changeset: 574536:cba38677e999
user: briggs <briggs%NetBSD.org@localhost>
date: Fri Mar 04 04:18:30 2005 +0000
description:
Fix from Nozomu Ando to ensure that read interrupts are acknowledged.
May address PR port-macppc/28870.
diffstat:
sys/arch/macppc/macppc/extintr.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r 60d4d33beba2 -r cba38677e999 sys/arch/macppc/macppc/extintr.c
--- a/sys/arch/macppc/macppc/extintr.c Fri Mar 04 03:59:07 2005 +0000
+++ b/sys/arch/macppc/macppc/extintr.c Fri Mar 04 04:18:30 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: extintr.c,v 1.50 2005/01/21 03:22:13 briggs Exp $ */
+/* $NetBSD: extintr.c,v 1.51 2005/03/04 04:18:30 briggs Exp $ */
/*-
* Copyright (c) 2000, 2001 Tsubai Masanari.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.50 2005/01/21 03:22:13 briggs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: extintr.c,v 1.51 2005/03/04 04:18:30 briggs Exp $");
#include "opt_multiprocessor.h"
@@ -199,18 +199,20 @@
gc_read_irq()
{
uint32_t rv = 0;
+ uint32_t int_state;
uint32_t events, e;
uint32_t levels;
/* Get the internal interrupts */
- events = in32rb(INT_STATE_REG_L) & ~intr_level_mask;
+ int_state = in32rb(INT_STATE_REG_L);
+ events = int_state & ~intr_level_mask;
/* Get the enabled external interrupts */
levels = in32rb(INT_LEVEL_REG_L) & in32rb(INT_ENABLE_REG_L);
events = events | (levels & intr_level_mask);
- /* Clear any interrupts that we've read (and all external ints) */
- out32rb(INT_CLEAR_REG_L, events | intr_level_mask);
+ /* Clear any interrupts that we've read */
+ out32rb(INT_CLEAR_REG_L, events | int_state);
while (events) {
e = 31 - cntlzw(events);
rv |= 1 << virq[e];
Home |
Main Index |
Thread Index |
Old Index