amd64/174409: stopping during resume caused by io_apic.c change(r243764)
Andriy Gapon
avg at FreeBSD.org
Tue Dec 18 10:00:01 UTC 2012
The following reply was made to PR amd64/174409; it has been noted by GNATS.
From: Andriy Gapon <avg at FreeBSD.org>
To: KAHO Toshikazu <kaho at elam.kais.kyoto-u.ac.jp>
Cc: bug-followup at FreeBSD.org
Subject: Re: amd64/174409: stopping during resume caused by io_apic.c change(r243764)
Date: Tue, 18 Dec 2012 11:55:09 +0200
on 18/12/2012 03:54 KAHO Toshikazu said the following:
> Hello, and thanks for your work.
>
>> Could you please try the following patch?
>> I suspect that it might not be sufficient, I am working on some
>> additional changes.
>
> The patched kernel dosen't solve the problem. On waking up,
> the machine hangs with LCD backlight on, but it shows nothing.
> Power off is all that I can do. Each revision (r243764 or r227309)
> of io_apic.c with the patch makes the machine hangs. The machine
> can wake up with io_apic.c reverted to r227309 and without the patch.
>
I understand.
Could you please try the following patch on top of the previous one (without
reverting r227309, of course) ?
--- 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 {
--- a/sys/x86/x86/intr_machdep.c
+++ b/sys/x86/x86/intr_machdep.c
@@ -287,11 +287,11 @@ intr_resume(void)
atpic_reset();
#endif
mtx_lock(&intr_table_lock);
- lapic_setup(0);
STAILQ_FOREACH(pic, &pics, pics) {
if (pic->pic_resume != NULL)
pic->pic_resume(pic);
}
+ lapic_setup(0);
mtx_unlock(&intr_table_lock);
}
I've put the combined patch here:
http://people.freebsd.org/~avg/apic-resume.diff
--
Andriy Gapon
More information about the freebsd-amd64
mailing list