From owner-svn-src-head@FreeBSD.ORG Mon Feb 16 21:56:21 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44A87D2; Mon, 16 Feb 2015 21:56:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14C82878; Mon, 16 Feb 2015 21:56:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1GLuKNd070799; Mon, 16 Feb 2015 21:56:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1GLuKL3070794; Mon, 16 Feb 2015 21:56:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502162156.t1GLuKL3070794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 16 Feb 2015 21:56:20 +0000 (UTC) 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 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 21:56:21 -0000 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); }