From owner-svn-src-head@freebsd.org Sat Feb 24 01:24:58 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92666F06390; Sat, 24 Feb 2018 01:24:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 443D0845AD; Sat, 24 Feb 2018 01:24:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3F2141E6B7; Sat, 24 Feb 2018 01:24:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1O1OwYX001713; Sat, 24 Feb 2018 01:24:58 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1O1OwdL001712; Sat, 24 Feb 2018 01:24:58 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201802240124.w1O1OwdL001712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Sat, 24 Feb 2018 01:24:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r329889 - head/sys/amd64/acpica X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/amd64/acpica X-SVN-Commit-Revision: 329889 X-SVN-Commit-Repository: base 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.25 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: Sat, 24 Feb 2018 01:24:58 -0000 Author: jkim Date: Sat Feb 24 01:24:57 2018 New Revision: 329889 URL: https://svnweb.freebsd.org/changeset/base/329889 Log: Partially revert r197863 to reduce diff against i386. When I wrote the patch, I wanted to remove SYSINIT() usage from amd64 code. There is no reason to keep the divergence any more because iwasaki merged most amd64 suspend/resume code to i386 with r235622. Note this also fixed an enge case reported by royger. [1] Suggested by: jhb Reviewed by: royger Tested by: royger [1] MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14400 [1] Modified: head/sys/amd64/acpica/acpi_machdep.c Modified: head/sys/amd64/acpica/acpi_machdep.c ============================================================================== --- head/sys/amd64/acpica/acpi_machdep.c Sat Feb 24 01:15:33 2018 (r329888) +++ head/sys/amd64/acpica/acpi_machdep.c Sat Feb 24 01:24:57 2018 (r329889) @@ -63,6 +63,7 @@ acpi_machdep_init(device_t dev) sc = device_get_softc(dev); acpi_apm_init(sc); + acpi_install_wakeup_handler(sc); if (intr_model != ACPI_INTR_PIC) acpi_SetIntrModel(intr_model); @@ -349,20 +350,13 @@ nexus_acpi_probe(device_t dev) static int nexus_acpi_attach(device_t dev) { - device_t acpi_dev; - int error; nexus_init_resources(); bus_generic_probe(dev); - acpi_dev = BUS_ADD_CHILD(dev, 10, "acpi", 0); - if (acpi_dev == NULL) + if (BUS_ADD_CHILD(dev, 10, "acpi", 0) == NULL) panic("failed to add acpi0 device"); - error = bus_generic_attach(dev); - if (error == 0) - acpi_install_wakeup_handler(device_get_softc(acpi_dev)); - - return (error); + return (bus_generic_attach(dev)); } static device_method_t nexus_acpi_methods[] = {