Module Name:    src
Committed By:   msaitoh
Date:           Wed Jul 15 07:29:13 UTC 2015

Modified Files:
        src/sys/arch/x86/x86: mpacpi.c

Log Message:
 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.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/x86/x86/mpacpi.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/x86/x86/mpacpi.c
diff -u src/sys/arch/x86/x86/mpacpi.c:1.99 src/sys/arch/x86/x86/mpacpi.c:1.100
--- src/sys/arch/x86/x86/mpacpi.c:1.99	Wed Jul 15 04:49:02 2015
+++ src/sys/arch/x86/x86/mpacpi.c	Wed Jul 15 07:29:13 2015
@@ -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_scan_apics(device_t self, int *nc
 	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 @@ mpacpi_scan_apics(device_t self, int *nc
 	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

Reply via email to