From cddddcfe958e58ce63b8510896992b9732d14a9e Mon Sep 17 00:00:00 2001 From: CyrIng Date: Tue, 13 Feb 2024 20:45:30 +0100 Subject: [PATCH] [CR] `cpufreq_get_hw_max_freq()` only available since kernel 5.7.0 --- aarch64/corefreqk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aarch64/corefreqk.c b/aarch64/corefreqk.c index 5b85c904..ac040805 100644 --- a/aarch64/corefreqk.c +++ b/aarch64/corefreqk.c @@ -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;