Re: [PATCH 1/5] cpufreq: loongson3: Make this drvier depend on MACH_LOONGSON64

From: Zhongqiu Han

Date: Thu Aug 20 2026 - 05:31:10 EST


Hello Huacai,
Just share a few inline comments/questions below:

On 8/18/2026 8:39 PM, Huacai Chen wrote:
32BIT Loongson machines don't have SMC and FreqCtrl registers, so make
this drvier depend on MACH_LOONGSON64.

Typo --> driver? Likewise the subject.


Cc: stable@xxxxxxxxxxxxxxx

Nit, it is better to add fixes tag? For example:

ccf51454145b ("cpufreq: Add Loongson-3 CPUFreq driver support")

Signed-off-by: Huacai Chen <chenhuacai@xxxxxxxxxxx>
---
drivers/cpufreq/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index db83f3365698..edc1299098d4 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -288,6 +288,7 @@ endif
if LOONGARCH
config LOONGSON3_CPUFREQ
tristate "Loongson3 CPUFreq Driver"
+ depends on MACH_LOONGSON64

Small nit:

Please feel free to correct me.

There are two MACH_LOONGSON64 symbols in the tree:
arch/loongarch/Kconfig: config MACH_LOONGSON64
def_bool 64BIT

arch/mips/Kconfig: config MACH_LOONGSON64
bool "Loongson 64-bit family of
machines"
select ...

The one that actually applies here is the LoongArch one, i.e. this is
really just "depends on 64BIT". Since drivers/cpufreq/Kconfig is a
shared file that also contains an "if MIPS" block, please at least
is it better to mention it in the changelog which MACH_LOONGSON64 is
using, because the LoongArch one has no prompt and is therefore
invisible in menuconfig. Or just write "depends on 64BIT"?


help
This option adds a CPUFreq driver for Loongson processors which
support software configurable cpu frequency.


--
Thx and BRs,
Zhongqiu Han