Re: weird fxp / timecounter interaction in top-of-tree

From: Dag-Erling Smørgrav <des_at_ofug.org>
Date: Sun, 06 Apr 2003 20:19:10 +0200
des_at_ofug.org (Dag-Erling Smørgrav) writes:
>  - loading the if_fxp module (and miibus as a dependency) switches the
>    timecounter hardware to PIIX.

This turns out to be caused by a combination of bugs in tc_init() and
the piix driver.  The piix driver initializes the PIIX timecounter in
piix_attach(), which is called whenever the PCI bus is rescanned (e.g.
when a driver for a PCI device such as fxp is loaded) instead of
piix_probe() which is only called once.  The other problem is that
tc_init() will actually install the timecounter being initialized, so
in effect, unless you explicitly select one after boot, your machine
will use whichever timecounter was probed and attached last.

I've modified the piix driver to only initialize the timecounter once,
and tc_init() to use the *first* timecounter it runs across (on i386,
this is generally the i8254), leaving the admin to pick another one if
the default does not suit her.  See the attached patch.

>  - switching the timecounter hardware manually to PIIX when if_fxp and
>    miibus are loaded causes the machine to lock up.

This problem seems to have disappeared now that the PIIX timecounter
only gets initialized once.

DES
-- 
Dag-Erling Smørgrav - des_at_ofug.org


Received on Sun Apr 06 2003 - 09:19:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:02 UTC