Initialize x2APIC mode on the resume path before accessing LAPIC.
Remove unneeded disable of LAPIC in the native_lapic_xapic_mode(). We attempt to send wakeup IPI on the resume path right after BSP wakeup, so disabling is wrong. Reported and tested by: glebius, "Ranjan1018 ." <214748mv@gmail.com> Sponsored by: The FreeBSD Foundation MFC after: 2 months
This commit is contained in:
parent
8dc98c2a36
commit
5f674c4cbd
@ -1507,6 +1507,7 @@ cpususpend_handler(void)
|
|||||||
vmm_resume_p();
|
vmm_resume_p();
|
||||||
|
|
||||||
/* Resume MCA and local APIC */
|
/* Resume MCA and local APIC */
|
||||||
|
lapic_xapic_mode();
|
||||||
mca_resume();
|
mca_resume();
|
||||||
lapic_setup(0);
|
lapic_setup(0);
|
||||||
|
|
||||||
|
@ -1555,6 +1555,7 @@ cpususpend_handler(void)
|
|||||||
cpu_ops.cpu_resume();
|
cpu_ops.cpu_resume();
|
||||||
|
|
||||||
/* Resume MCA and local APIC */
|
/* Resume MCA and local APIC */
|
||||||
|
lapic_xapic_mode();
|
||||||
mca_resume();
|
mca_resume();
|
||||||
lapic_setup(0);
|
lapic_setup(0);
|
||||||
|
|
||||||
|
@ -270,6 +270,7 @@ acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result,
|
|||||||
initializecpu();
|
initializecpu();
|
||||||
PCPU_SET(switchtime, 0);
|
PCPU_SET(switchtime, 0);
|
||||||
PCPU_SET(switchticks, ticks);
|
PCPU_SET(switchticks, ticks);
|
||||||
|
lapic_xapic_mode();
|
||||||
#ifdef SMP
|
#ifdef SMP
|
||||||
if (!CPU_EMPTY(&suspcpus))
|
if (!CPU_EMPTY(&suspcpus))
|
||||||
acpi_wakeup_cpus(sc);
|
acpi_wakeup_cpus(sc);
|
||||||
|
@ -527,7 +527,6 @@ native_lapic_xapic_mode(void)
|
|||||||
saveintr = intr_disable();
|
saveintr = intr_disable();
|
||||||
if (x2apic_mode)
|
if (x2apic_mode)
|
||||||
native_lapic_enable_x2apic();
|
native_lapic_enable_x2apic();
|
||||||
native_lapic_disable();
|
|
||||||
intr_restore(saveintr);
|
intr_restore(saveintr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user