Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Jul 2016 05:12:55 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Bruce Evans <brde@optusnet.com.au>, Jung-uk Kim <jkim@freebsd.org>,  src-committers <src-committers@freebsd.org>,  "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>,  "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r302782 - in head/sys: dev/acpica i386/isa
Message-ID:  <20160716034343.V1727@besplex.bde.org>
In-Reply-To: <CANCZdfqHh2ZTgFYW=LAUUwNk1mCfhNOSP--Y5tFRJPkgHY1a-w@mail.gmail.com>
References:  <201607131916.u6DJGWtq012089@repo.freebsd.org> <20160716001505.D851@besplex.bde.org> <CANCZdfqHh2ZTgFYW=LAUUwNk1mCfhNOSP--Y5tFRJPkgHY1a-w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Jul 2016, Warner Losh wrote:

> On Fri, Jul 15, 2016 at 9:09 AM, Bruce Evans <brde@optusnet.com.au> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160716034343.V1727>