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 Configure ioapic before lapic because lapic...



details:   https://anonhg.NetBSD.org/src/rev/33140e604558
branches:  trunk
changeset: 339339:33140e604558
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Wed Jul 15 07:29:13 2015 +0000

description:
Configure ioapic before lapic because lapic(lapic_set_lvt()) checks the
existence of ioapic. This change fixes a problem that some machines hang
after attaching ehci (little after writing EHCI_USBINTR to enable interrupt).
Even though cold == 1, LAPIC_LVINT0 was not set as masked. Perhaps it's the
reason of the problem.

This problem was observed on SuperMicro X10SLX-F, X10SDV-TLN4F and
Shuttle DS57U without wm(4) driver.

diffstat:

 sys/arch/x86/x86/mpacpi.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 55f0ef7c09d4 -r 33140e604558 sys/arch/x86/x86/mpacpi.c
--- a/sys/arch/x86/x86/mpacpi.c Wed Jul 15 04:49:02 2015 +0000
+++ b/sys/arch/x86/x86/mpacpi.c Wed Jul 15 07:29:13 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpacpi.c,v 1.99 2015/07/15 04:49:02 msaitoh Exp $      */
+/*     $NetBSD: mpacpi.c,v 1.100 2015/07/15 07:29:13 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.99 2015/07/15 04:49:02 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpacpi.c,v 1.100 2015/07/15 07:29:13 msaitoh Exp $");
 
 #include "acpica.h"
 #include "opt_acpi.h"
@@ -452,6 +452,8 @@
        mpacpi_ncpu = mpacpi_nintsrc = mpacpi_nioapic = 0;
        acpi_madt_walk(mpacpi_count, self);
 
+       acpi_madt_walk(mpacpi_config_ioapic, self);
+
 #if NLAPIC > 0
        lapic_boot_init(mpacpi_lapic_base);
 #endif
@@ -461,8 +463,6 @@
        if (mpacpi_ncpu == 0)
                goto done;
 
-       acpi_madt_walk(mpacpi_config_ioapic, self);
-
 #if NPCI > 0
        /*
         * If PCI routing tables can't be built we report failure



Home | Main Index | Thread Index | Old Index