From da0755eebb5a41cca24ab54cd676f07f3ae7123f Mon Sep 17 00:00:00 2001 From: Chu Guangqing Date: Tue, 16 Sep 2025 16:01:43 +0800 Subject: [PATCH] anolis: arm64: interpretation of the lag issue when reading /proc/cpuinfo ANBZ: #24712 On the Ampere A192-32X CPU environment, reading /proc/cpuinfo is laggy, and the cause is the batch retrieval of CPU frequencies. Do not retrieve CPU frequency in the Ampere CPU environment. Signed-off-by: Chu Guangqing --- arch/arm64/kernel/cpuinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpuinfo.c b/arch/arm64/kernel/cpuinfo.c index 00805a3bdf85..2a5704df4ff0 100644 --- a/arch/arm64/kernel/cpuinfo.c +++ b/arch/arm64/kernel/cpuinfo.c @@ -252,7 +252,9 @@ static int c_show(struct seq_file *m, void *v) id_aa64mmfr0_pa_range_bits(cpuinfo->reg_id_aa64mmfr0), id_aa64mmfr2_va_range_bits(cpuinfo->reg_id_aa64mmfr2)); - freq = arch_cpufreq_get_khz(cpu); + /*Do not retrieve CPU frequency in the Ampere CPU environment.*/ + if (MIDR_IMPLEMENTOR(midr) != ARM_CPU_IMP_APM) + freq = arch_cpufreq_get_khz(cpu); if (!freq) freq = pv_cpufreq_get(); if (freq) -- Gitee