HomeFreeBSD

cpufreq_dt: Find the closest frequency

Description

cpufreq_dt: Find the closest frequency

When building the frequencies table we convert the value in the DTS to
megahertz and loose precision. While it's not a problem for most of the
DTS it is when the expected frequency value is strict down to the hertz.
So it's either we don't truncate the value and have some ugly and long
values in the sysctls or we just find the closest frequency.
Do the latter.

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D41762
Sponsored by: Beckhoff Automation GmbH & Co. KG

Details

Provenance
manuAuthored on Sep 6 2023, 4:40 PM
Reviewer
mmel
Differential Revision
D41762: cpufreq_dt: Find the closest frequency
Parents
rG229c65a83fbe: kern: Globally define abs64
Branches
Unknown
Tags
Unknown