From owner-svn-src-head@freebsd.org Sun Jun 11 12:20:36 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20EB1D860C1; Sun, 11 Jun 2017 12:20:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 A9B313A6B; Sun, 11 Jun 2017 12:20:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id v5BCKPGI084606 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 11 Jun 2017 15:20:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua v5BCKPGI084606 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id v5BCKPHx084604; Sun, 11 Jun 2017 15:20:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Jun 2017 15:20:25 +0300 From: Konstantin Belousov To: Alexey Dokuchaev Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316767 - head/sys/amd64/amd64 Message-ID: <20170611122025.GP2088@kib.kiev.ua> References: <201704131549.v3DFnt9I004050@repo.freebsd.org> <20170610235125.GA3587@FreeBSD.org> <20170611041357.GA19892@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170611041357.GA19892@FreeBSD.org> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Sun, 11 Jun 2017 12:20:36 -0000 On Sun, Jun 11, 2017 at 04:13:57AM +0000, Alexey Dokuchaev wrote: > On Sat, Jun 10, 2017 at 11:51:25PM +0000, Alexey Dokuchaev wrote: > > On Thu, Apr 13, 2017 at 03:49:55PM +0000, Konstantin Belousov wrote: > > > New Revision: 316767 > > > URL: https://svnweb.freebsd.org/changeset/base/316767 > > > > > > Log: > > > Map DMAP as nx. > > > > > > Demotions preserve PG_NX, so it is enough to set nx bit for initial > > > lowest-level paging entries. > > > > Hi Kostik, > > > > It seems this change breaks resume with radeonkms(4): my laptop fells into > > sleep, but upon resume it immediately reboots with kernels after r316767. > > > > Reverting these two lines fixes resuming at least up to r316986, but the > > latest -CURRENT still reboots, perhaps for another reason. > > Second revision is r318318 which looks related to r316767. Updating kernel > to the latest revision and backing out these two (any one of them alone is > not enough) fixed resume for me. > > Apparently something else is required for nx-mapped DMAP. Anything I can > help with debugging this? Do you claim that latest HEAD with reverted r316767 reboots on resume on your machine ? Please confirm. Are you running on AMD CPU ? I want to see the first 100 lines of verbose dmesg, and the output of "cpucontrol -m 0xc0000080 /dev/cpuctl0". Also, try the following patch. diff --git a/sys/x86/acpica/acpi_wakeup.c b/sys/x86/acpica/acpi_wakeup.c index 74f4fedc28f..690f8b765f2 100644 --- a/sys/x86/acpica/acpi_wakeup.c +++ b/sys/x86/acpica/acpi_wakeup.c @@ -224,7 +224,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) WAKECODE_FIXUP(reset_video, uint8_t, (acpi_reset_video != 0)); #ifdef __amd64__ - WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER)); + WAKECODE_FIXUP(wakeup_efer, uint64_t, rdmsr(MSR_EFER) & + ~(EFER_LMA)); #else WAKECODE_FIXUP(wakeup_cr4, register_t, pcb->pcb_cr4); #endif