Skip to content

Commit

Permalink
[CR] cpufreq_get_hw_max_freq() only available since kernel 5.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
cyring committed Feb 13, 2024
1 parent 1b1c2c5 commit cddddcf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aarch64/corefreqk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,9 @@ void Query_DeviceTree(unsigned int cpu)
);
cntfrq.value = cntfrq.value / 1000000U;
#ifdef CONFIG_CPU_FREQ
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)
max_freq = cpufreq_get_hw_max_freq(cpu);
#endif
#endif
PUBLIC(RO(Core, AT(cpu)))->Boost[BOOST(MAX)] = \
max_freq > 0 ? max_freq / 100000U : cntfrq.ClockFreq_Hz;
Expand Down

0 comments on commit cddddcf

Please sign in to comment.