Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Fix for ioapic irq routing. This fixes ker...



details:   https://anonhg.NetBSD.org/src/rev/26dcbd8fbb64
branches:  trunk
changeset: 552096:26dcbd8fbb64
user:      skd <skd%NetBSD.org@localhost>
date:      Thu Sep 18 19:31:19 2003 +0000

description:
Fix for ioapic irq routing.  This fixes kern/22728.
Approved by fvdl.

diffstat:

 sys/arch/x86/x86/intr.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r 9fff82d270c1 -r 26dcbd8fbb64 sys/arch/x86/x86/intr.c
--- a/sys/arch/x86/x86/intr.c   Thu Sep 18 18:38:48 2003 +0000
+++ b/sys/arch/x86/x86/intr.c   Thu Sep 18 19:31:19 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.6 2003/09/06 17:44:40 fvdl Exp $    */
+/*     $NetBSD: intr.c,v 1.7 2003/09/18 19:31:19 skd Exp $     */
 
 /*
  * Copyright 2002 (c) Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.6 2003/09/06 17:44:40 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.7 2003/09/18 19:31:19 skd Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -262,6 +262,14 @@
         */
        if (legacy_irq != -1) {
                ci = &cpu_info_primary;
+               /* must check for duplicate pic + pin first */
+               for (slot = 0 ; slot < MAX_INTR_SOURCES ; slot++) {
+                       isp = ci->ci_isources[slot];
+                       if (isp != NULL && isp->is_pic == pic &&
+                           isp->is_pin == pin ) {
+                               goto duplicate;
+                       }
+               }
                slot = legacy_irq;
                isp = ci->ci_isources[slot];
                if (isp == NULL) {
@@ -284,7 +292,7 @@
                                goto other;
                        }
                }
-
+duplicate:
                if (pic == &i8259_pic)
                        idtvec = ICU_OFFSET + legacy_irq;
                else {



Home | Main Index | Thread Index | Old Index