svn commit: r247427 - projects/calloutng/sys/dev/acpica
Alexander Motin
mav at FreeBSD.org
Thu Feb 28 00:14:04 UTC 2013
Author: mav
Date: Thu Feb 28 00:14:03 2013
New Revision: 247427
URL: http://svnweb.freebsd.org/changeset/base/247427
Log:
We don't need any precision here. Let it be fast and dirty shift then slow
and excessively precise 64-bit division.
Modified:
projects/calloutng/sys/dev/acpica/acpi_cpu.c
Modified: projects/calloutng/sys/dev/acpica/acpi_cpu.c
==============================================================================
--- projects/calloutng/sys/dev/acpica/acpi_cpu.c Wed Feb 27 23:17:45 2013 (r247426)
+++ projects/calloutng/sys/dev/acpica/acpi_cpu.c Thu Feb 28 00:14:03 2013 (r247427)
@@ -981,8 +981,8 @@ acpi_cpu_idle(sbintime_t sbt)
/* Find the lowest state that has small enough latency. */
us = sc->cpu_prev_sleep;
- if (sbt >= 0 && us > sbt / SBT_1US)
- us = sbt / SBT_1US;
+ if (sbt >= 0 && us > (sbt >> 12))
+ us = (sbt >> 12);
cx_next_idx = 0;
if (cpu_disable_deep_sleep)
i = min(sc->cpu_cx_lowest, sc->cpu_non_c3);
More information about the svn-src-projects
mailing list