From owner-svn-src-all@freebsd.org Fri Jul 15 19:12:58 2016 Return-Path: Delivered-To: svn-src-all@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 577CBB9AAC0; Fri, 15 Jul 2016 19:12:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 2053C1CD3; Fri, 15 Jul 2016 19:12:57 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-149-109.carlnfd1.nsw.optusnet.com.au (c122-106-149-109.carlnfd1.nsw.optusnet.com.au [122.106.149.109]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 0BC7A1A6B3E; Sat, 16 Jul 2016 05:12:55 +1000 (AEST) Date: Sat, 16 Jul 2016 05:12:55 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Bruce Evans , Jung-uk Kim , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r302782 - in head/sys: dev/acpica i386/isa In-Reply-To: Message-ID: <20160716034343.V1727@besplex.bde.org> References: <201607131916.u6DJGWtq012089@repo.freebsd.org> <20160716001505.D851@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=OtmysHLt c=1 sm=1 tr=0 a=R/f3m204ZbWUO/0rwPSMPw==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=zm8i689NDrxu0cr7Vz0A:9 a=CjuIK1q_8ugA:10 a=Oa0T6EYmKFNB-xRHvYM1:22 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2016 19:12:58 -0000 On Fri, 15 Jul 2016, Warner Losh wrote: > On Fri, Jul 15, 2016 at 9:09 AM, Bruce Evans wrote: >> pmtimer is in i386's GENERIC, but this is probably not needed now > > I think it's time to relegate pmtimer to the apm power stuff and make sure that > ACPI has the right hooks to do anything it currently isn't doing > correctly. pmtimer > was originally written for apm and was never really brought forward into the > ACPI era... I thought that pmtimer was only for apm. Since it not mentioned in any man page, it is not clear what it is for. However, it is documented in i386/conf/NOTES as "Adjust system timer at wakeup time". According to that, it is a bug for acpi to do its own adjustment and not use pmtimer. However, pmtimer only exists on i386 with isa and it doesn't actually adjust _the_ system timer there or have any dependencies on i386 or isa except for foot shooting. What it actually does is: - restore all hardware timers using blind calls between dummy device drivers. This is broken if an attached driver calls an unattached one, but usually on x86, all the drivers are attached so this reduces to spelling boolean true using only 100-200 lines of driver code. The i386 and isa dependencies in pm are only needed to spell true there. This spelling of true depends on i386 requiring isa. That is: true := isa_parent_is_attached(). - restore the system (software) timer using MI code - try to fix up callups using broken ifdefed out MI code. The recent commit makes the comment not match the code in another way. Now the conditon for using pmtimer is 'if (true || !acpi_is_attached())'. Bruce