Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/eisa port-i386/47907: kernel trap when using E...



details:   https://anonhg.NetBSD.org/src/rev/e412a0f0ca3c
branches:  trunk
changeset: 787438:e412a0f0ca3c
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Tue Jun 18 08:48:54 2013 +0000

description:
port-i386/47907: kernel trap when using EISA with I/O APIC on i386

Patch from Felix Deichmann.

XXX pullup netbsd-6

diffstat:

 sys/arch/i386/eisa/eisa_machdep.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (52 lines):

diff -r 743ab5344007 -r e412a0f0ca3c sys/arch/i386/eisa/eisa_machdep.c
--- a/sys/arch/i386/eisa/eisa_machdep.c Tue Jun 18 08:01:00 2013 +0000
+++ b/sys/arch/i386/eisa/eisa_machdep.c Tue Jun 18 08:48:54 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eisa_machdep.c,v 1.37 2011/09/01 15:10:31 christos Exp $       */
+/*     $NetBSD: eisa_machdep.c,v 1.38 2013/06/18 08:48:54 uebayasi Exp $       */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.37 2011/09/01 15:10:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: eisa_machdep.c,v 1.38 2013/06/18 08:48:54 uebayasi Exp $");
 
 #include "ioapic.h"
 
@@ -106,7 +106,7 @@
 eisa_attach_hook(device_t parent, device_t self,
     struct eisabus_attach_args *eba)
 {
-       extern int eisa_has_been_seen; 
+       extern int eisa_has_been_seen;
 
        /*
         * Notify others that might need to know that the EISA bus
@@ -176,7 +176,6 @@
        snprintf(irqstr, sizeof(irqstr), "irq %d", ih);
 #endif
        return (irqstr);
-       
 }
 
 const struct evcnt *
@@ -199,12 +198,13 @@
 
 #if NIOAPIC > 0
        if (ih & APIC_INT_VIA_APIC) {
-               pic = (struct pic *)ioapic_find(APIC_IRQ_APIC(ih));
-               if (pic == NULL) {
-                       aprint_error("eisa_intr_establish: bad ioapic %d\n",
+               struct ioapic_softc * const ioapic = ioapic_find(APIC_IRQ_APIC(ih));
+               if (ioapic == NULL) {
+                       aprint_normal("eisa_intr_establish: bad ioapic %d\n",
                            APIC_IRQ_APIC(ih));
                        return NULL;
                }
+               pic = &ioapic->sc_pic;
                pin = APIC_IRQ_PIN(ih);
                irq = APIC_IRQ_LEGACY_IRQ(ih);
                if (irq < 0 || irq >= NUM_LEGACY_IRQS)



Home | Main Index | Thread Index | Old Index