Page MenuHomeFreeBSD

LinuxKPI: Add cpufreq_quick_get_max to LinuxKPI for amdkfd support
Needs ReviewPublic

Authored by siri_racha.ca on Aug 14 2026, 4:41 PM.
Referenced Files
Unknown Object (File)
Tue, Sep 22, 1:10 PM
Unknown Object (File)
Mon, Sep 21, 2:20 PM
Unknown Object (File)
Sun, Sep 20, 9:03 PM
Unknown Object (File)
Sun, Sep 20, 9:26 AM
Unknown Object (File)
Sun, Sep 20, 1:07 AM
Unknown Object (File)
Fri, Sep 18, 12:34 AM
Unknown Object (File)
Tue, Sep 15, 9:01 AM
Unknown Object (File)
Mon, Sep 14, 7:51 PM

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

Adding the cpufreq_quick_get_max function for amdkfd support as it's called by
kfd_topology.c

Sponsored By: The FreeBSD Foundation

Test Plan

Builds when applied to CURRENT

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

siri_racha.ca edited the summary of this revision. (Show Details)
siri_racha.ca edited the test plan for this revision. (Show Details)
sys/compat/linuxkpi/common/include/linux/cpufreq.h
26–27

Linux returns 0 if no result, it's probably sensible to do the same here. On platforms of interest in this context the sysctl is going to be successful.

siri_racha.ca added inline comments.
sys/compat/linuxkpi/common/include/linux/cpufreq.h
26–27

Sounds good, I thought when I first read the Linux impl it returned 1 Ghz, checked again and it's 0.
My bad

bz added inline comments.
sys/compat/linuxkpi/common/include/linux/cpufreq.h
7

Please do not use LINUX but LINUXKPI prefixes; check some other files for samples (LINUX is the historic name we try to get rid off)

23

No block needed here.

dumbbell added inline comments.
sys/compat/linuxkpi/common/include/linux/cpufreq.h
7

I think the LINUXKPI prefix should be added, as LINUX reflects the parent directory of the header here.

siri_racha.ca marked an inline comment as done.
siri_racha.ca marked an inline comment as done.
siri_racha.ca added inline comments.
sys/compat/linuxkpi/common/include/linux/cpufreq.h
7

Fixed, coped compat.h style and did _LINUXKPI_LINUX_CPUFREQ_H_