Page MenuHomeFreeBSD

Hide acpi_timer_test behind a tunable
ClosedPublic

Authored by cperciva on Tue, Sep 7, 11:04 PM.

Details

Reviewers
allanjude
imp
Summary

When hw.acpi.timer_test_enabled is set to 0, this makes acpi_timer_test return 1
without actually testing the ACPI timer; this results in ACPI-fast being used rather
than potentially using ACPI-safe.

The ACPI timer testing was introduced in 2002 as a workaround for errata in
Pentium II and Pentium III chipsets, and is unlikely to be needed in 2021.

While I'm here, add TSENTER/TSEXIT to make it easier to see the time spent
on the test (if it is enabled).

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

cperciva created this revision.
cperciva edited the summary of this revision. (Show Details)

Assuming this is approved, I plan to
(a) MFC it as-is to stable/13,
(b) Change the default in HEAD to acpi_timer_test_enabled = 0, and
(c) Nuke the test entirely in 15-CURRENT if nobody squawks while running 14.x.

allanjude added a subscriber: allanjude.

Reviewed By: allanjude

This revision is now accepted and ready to land.Tue, Sep 7, 11:21 PM
imp added inline comments.
sys/dev/acpica/acpi_timer.c
82

Why not #ifdef this to be 1 if building on i386 only?

sys/dev/acpica/acpi_timer.c
82

Just in case the workaround for broken Pentium II/III chipsets was also hiding issues with other more modern systems. I'm going to set it to 0 on HEAD anyway; I only have it set to 1 here because that's what I'll be MFCing (to avoid changing the default behaviour on -STABLE).

Whoops, forgot to put a link to this in the commit message.