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
F175722579: D58845.id187487.diff
Mon, Oct 12, 7:24 PM
Unknown Object (File)
Sun, Oct 11, 9:26 AM
Unknown Object (File)
Sat, Oct 10, 8:02 PM
Unknown Object (File)
Mon, Oct 5, 5:58 AM
Unknown Object (File)
Sun, Oct 4, 6:59 AM
Unknown Object (File)
Sun, Oct 4, 4:13 AM
Unknown Object (File)
Sun, Oct 4, 4:06 AM
Unknown Object (File)
Sun, Oct 4, 4:06 AM

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
8

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)

24

No block needed here.

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

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
8

Fixed, coped compat.h style and did _LINUXKPI_LINUX_CPUFREQ_H_