diff --git a/sys/x86/acpica/acpi_wakeup.c b/sys/x86/acpica/acpi_wakeup.c index 0c062bf..5a7663c 100644 --- a/sys/x86/acpica/acpi_wakeup.c +++ b/sys/x86/acpica/acpi_wakeup.c @@ -261,12 +261,17 @@ acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, #endif } + /* + * Re-program IO-APIC pins to their correct states before + * enabling Local APICs (which is done when CPUs are restarted). + */ + intr_resume(); + #ifdef SMP if (!CPU_EMPTY(&suspcpus)) restart_cpus(suspcpus); #endif mca_resume(); - intr_resume(); AcpiSetFirmwareWakingVector(0); } else { diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c index 31cc80b..1609bbb 100644 --- a/sys/x86/x86/intr_machdep.c +++ b/sys/x86/x86/intr_machdep.c @@ -291,6 +291,7 @@ intr_resume(void) if (pic->pic_resume != NULL) pic->pic_resume(pic); } + lapic_setup(0); mtx_unlock(&intr_table_lock); } diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index e994172..0df973a 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -160,7 +160,6 @@ static u_long lapic_timer_divisor; static struct eventtimer lapic_et; static void lapic_enable(void); -static void lapic_resume(struct pic *pic); static void lapic_timer_oneshot(struct lapic *, u_int count, int enable_int); static void lapic_timer_periodic(struct lapic *, @@ -172,8 +171,6 @@ static int lapic_et_start(struct eventtimer *et, struct bintime *first, struct bintime *period); static int lapic_et_stop(struct eventtimer *et); -struct pic lapic_pic = { .pic_resume = lapic_resume }; - static uint32_t lvt_mode(struct lapic *la, u_int pin, uint32_t value) { @@ -573,14 +570,6 @@ lapic_enable(void) lapic->svr = value; } -/* Reset the local APIC on the BSP during resume. */ -static void -lapic_resume(struct pic *pic) -{ - - lapic_setup(0); -} - int lapic_id(void) { @@ -1373,7 +1398,6 @@ apic_setup_io(void *dummy __unused) * properly program the LINT pins. */ lapic_setup(1); - intr_register_pic(&lapic_pic); if (bootverbose) lapic_dump("BSP");