From owner-svn-src-head@freebsd.org Tue Oct 10 19:20:40 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 01C77E3AA3D; Tue, 10 Oct 2017 19:20:40 +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 mx1.freebsd.org (Postfix) with ESMTPS id C2E3C69251; Tue, 10 Oct 2017 19:20:39 +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 v9AJKcMP041750; Tue, 10 Oct 2017 19:20:38 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v9AJKcto041749; Tue, 10 Oct 2017 19:20:38 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201710101920.v9AJKcto041749@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 10 Oct 2017 19:20:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r324501 - head/sys/dev/acpica/Osd X-SVN-Group: head X-SVN-Commit-Author: jkim X-SVN-Commit-Paths: head/sys/dev/acpica/Osd X-SVN-Commit-Revision: 324501 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.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: Tue, 10 Oct 2017 19:20:40 -0000 Author: jkim Date: Tue Oct 10 19:20:38 2017 New Revision: 324501 URL: https://svnweb.freebsd.org/changeset/base/324501 Log: Do not check whether AcpiOsGetTimer() is called during boot. From ACPICA 20170929, AcpiOsGetTimer() should be available early because While() loop timeout mechanism was reimplemented with it. Unfortunately, it means AcpiLoadTables() may cause panic when a While() loop is executed. After having lengthy discussions with ACPICA developers, I have concluded that dummy timecounter is good enough for the purpose and it is the least intrusive solution for now. Also, they reminded me the ACPI specification implies OS timer function should be available before loading tables. Modified: head/sys/dev/acpica/Osd/OsdSchedule.c Modified: head/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- head/sys/dev/acpica/Osd/OsdSchedule.c Tue Oct 10 19:14:40 2017 (r324500) +++ head/sys/dev/acpica/Osd/OsdSchedule.c Tue Oct 10 19:20:38 2017 (r324501) @@ -274,9 +274,6 @@ AcpiOsGetTimer(void) struct bintime bt; UINT64 t; - /* XXX During early boot there is no (decent) timer available yet. */ - KASSERT(cold == 0, ("acpi: timer op not yet supported during boot")); - binuptime(&bt); t = (uint64_t)bt.sec * 10000000; t += ((uint64_t)10000000 * (uint32_t)(bt.frac >> 32)) >> 32;