On Sat, Jan 27, 2018 at 11:22:59AM +0800, Huacai Chen wrote: > Loongson-3A/3B support frequency scaling. But due to hardware > limitation, Loongson-3A's frequency scaling is not independent for > each core, we suggest enable Loongson-3A's CPUFreq only when there is > one core online. Does the code do anything to enforce that? If not, should it? Will it just work suboptimally if you tried? > arch/mips/include/asm/mach-loongson64/loongson.h | 1 + > arch/mips/kernel/smp.c | 3 +- > arch/mips/loongson64/Kconfig | 1 + > arch/mips/loongson64/common/platform.c | 13 +- > arch/mips/loongson64/loongson-3/Makefile | 2 +- > arch/mips/loongson64/loongson-3/clock.c | 191 ++++++++++++++++++ > drivers/cpufreq/Kconfig | 13 ++ > drivers/cpufreq/Makefile | 1 + > drivers/cpufreq/loongson3_cpufreq.c | 236 +++++++++++++++++++++++ This could presumably be fairly neatly divided into 3 separate changes: - New clocks driver - New cpufreq driver - Minimal platform changes in arch/mips to instantiate the drivers Please can you use the common clock framework i.e. a driver in drivers/clk/, rather than adding yet another implementation of the clk api in arch/mips/. Each change needs the appropriate maintainers on Cc or you'll never get the required review. Cheers James
Attachment:
signature.asc
Description: Digital signature