Date: Thu, 25 Jun 2026 00:28:00 +0000 From: Olivier Certner <olce@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 66d48f02de0f - main - hwpstate_intel(4): Comment the EPB to EPP computation Message-ID: <6a3c7610.39ddc.56d2eba9@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=66d48f02de0fbf4d8efb3d4edc69f37c54f130fd commit 66d48f02de0fbf4d8efb3d4edc69f37c54f130fd Author: Olivier Certner <olce@FreeBSD.org> AuthorDate: 2026-06-24 20:14:12 +0000 Commit: Olivier Certner <olce@FreeBSD.org> CommitDate: 2026-06-25 00:27:24 +0000 hwpstate_intel(4): Comment the EPB to EPP computation Explain why the '* 17' instead of '* 16', as suggested in revision D55629. Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation --- sys/x86/cpufreq/hwpstate_intel.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/x86/cpufreq/hwpstate_intel.c b/sys/x86/cpufreq/hwpstate_intel.c index b18f1b674d22..6d3100217365 100644 --- a/sys/x86/cpufreq/hwpstate_intel.c +++ b/sys/x86/cpufreq/hwpstate_intel.c @@ -254,6 +254,10 @@ out: return (ret); } +/* + * Multiplying by 17 here allows to send [0;15] to the full [0;255] range (so + * 255 is reported when EPB is set to 15, instead of 240). + */ #define EPB_TO_EPP(x) ((x) * 17) #define EPP_TO_EPB(x) ((x) >> 4)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a3c7610.39ddc.56d2eba9>
