Date: Mon, 16 Feb 2015 21:56:20 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278869 - in head/sys: amd64/amd64 i386/i386 x86/acpica x86/x86 Message-ID: <201502162156.t1GLuKL3070794@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Mon Feb 16 21:56:19 2015 New Revision: 278869 URL: https://svnweb.freebsd.org/changeset/base/278869 Log: 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 Modified: head/sys/amd64/amd64/mp_machdep.c head/sys/i386/i386/mp_machdep.c head/sys/x86/acpica/acpi_wakeup.c head/sys/x86/x86/local_apic.c Modified: head/sys/amd64/amd64/mp_machdep.c ============================================================================== --- head/sys/amd64/amd64/mp_machdep.c Mon Feb 16 21:52:28 2015 (r278868) +++ head/sys/amd64/amd64/mp_machdep.c Mon Feb 16 21:56:19 2015 (r278869) @@ -1507,6 +1507,7 @@ cpususpend_handler(void) vmm_resume_p(); /* Resume MCA and local APIC */ + lapic_xapic_mode(); mca_resume(); lapic_setup(0); Modified: head/sys/i386/i386/mp_machdep.c ============================================================================== --- head/sys/i386/i386/mp_machdep.c Mon Feb 16 21:52:28 2015 (r278868) +++ head/sys/i386/i386/mp_machdep.c Mon Feb 16 21:56:19 2015 (r278869) @@ -1555,6 +1555,7 @@ cpususpend_handler(void) cpu_ops.cpu_resume(); /* Resume MCA and local APIC */ + lapic_xapic_mode(); mca_resume(); lapic_setup(0); Modified: head/sys/x86/acpica/acpi_wakeup.c ============================================================================== --- head/sys/x86/acpica/acpi_wakeup.c Mon Feb 16 21:52:28 2015 (r278868) +++ head/sys/x86/acpica/acpi_wakeup.c Mon Feb 16 21:56:19 2015 (r278869) @@ -270,6 +270,7 @@ acpi_wakeup_machdep(struct acpi_softc *s initializecpu(); PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); + lapic_xapic_mode(); #ifdef SMP if (!CPU_EMPTY(&suspcpus)) acpi_wakeup_cpus(sc); Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Mon Feb 16 21:52:28 2015 (r278868) +++ head/sys/x86/x86/local_apic.c Mon Feb 16 21:56:19 2015 (r278869) @@ -527,7 +527,6 @@ native_lapic_xapic_mode(void) saveintr = intr_disable(); if (x2apic_mode) native_lapic_enable_x2apic(); - native_lapic_disable(); intr_restore(saveintr); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502162156.t1GLuKL3070794>