From ca5f1efdd9403258db867e40cc32ae6c434318ea Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Mon, 23 May 2011 20:12:36 +0000 Subject: [PATCH] Decrease ACPI-fast timecounter quality to 900 and increase HPET timecounter quality to 950. HPET on modern platforms usually have better resolution and lower latency than ACPI timer. Effectively this changes default timecounter hardware from ACPI-fast to HPET by default when both are available. Discussed with: avg --- sys/dev/acpica/acpi_hpet.c | 2 +- sys/dev/acpica/acpi_timer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi_hpet.c b/sys/dev/acpica/acpi_hpet.c index 4ea5c8583b13..40e8676fceb3 100644 --- a/sys/dev/acpica/acpi_hpet.c +++ b/sys/dev/acpica/acpi_hpet.c @@ -476,7 +476,7 @@ hpet_attach(device_t dev) sc->tc.tc_get_timecount = hpet_get_timecount, sc->tc.tc_counter_mask = ~0u, sc->tc.tc_name = "HPET", - sc->tc.tc_quality = 900, + sc->tc.tc_quality = 950, sc->tc.tc_frequency = sc->freq; sc->tc.tc_priv = sc; tc_init(&sc->tc); diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c index f4562067080b..17416838e9e4 100644 --- a/sys/dev/acpica/acpi_timer.c +++ b/sys/dev/acpica/acpi_timer.c @@ -203,7 +203,7 @@ acpi_timer_probe(device_t dev) if (j == 10) { acpi_timer_timecounter.tc_name = "ACPI-fast"; acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount; - acpi_timer_timecounter.tc_quality = 1000; + acpi_timer_timecounter.tc_quality = 900; } else { acpi_timer_timecounter.tc_name = "ACPI-safe"; acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount_safe;