Hi Huacai, On Thu, Nov 15, 2018 at 03:53:55PM +0800, Huacai Chen wrote: > In /proc/cpuinfo, we keep "cpu model" as is, since GCC should use it > for -march=native. Keeping "cpu model", ie. __cpu_name, as-is sounds good... > This is only used by Loongson now (ICT is dropped in cpu name, and cpu > name can be overwritten by BIOS). ...but you don't do that because you remove "ICT " from it. > diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c > index 65dc2e6..9282cd3 100644 > --- a/arch/mips/kernel/cpu-probe.c > +++ b/arch/mips/kernel/cpu-probe.c > @@ -1500,30 +1500,40 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c, unsigned int cpu) > switch (c->processor_id & PRID_REV_MASK) { > case PRID_REV_LOONGSON2E: > c->cputype = CPU_LOONGSON2; > - __cpu_name[cpu] = "ICT Loongson-2"; > + __cpu_name[cpu] = "Loongson-2"; > set_elf_platform(cpu, "loongson2e"); > set_isa(c, MIPS_CPU_ISA_III); > c->fpu_msk31 |= FPU_CSR_CONDX; > + __cpu_full_name[cpu] = "Loongson-2E"; > break; ie. here you've changed the "cpu model" output, and you do the same for other cases. > diff --git a/arch/mips/loongson64/common/env.c b/arch/mips/loongson64/common/env.c > index 72e5f8f..d4f9979 100644 > --- a/arch/mips/loongson64/common/env.c > +++ b/arch/mips/loongson64/common/env.c > @@ -212,5 +219,11 @@ void __init prom_init_env(void) > break; > } > } > + mips_cpu_frequency = cpu_clock_freq; > pr_info("CpuClock = %u\n", cpu_clock_freq); > + > + /* Append default cpu frequency with round-off */ > + sprintf(freq, " @ %uMHz", (cpu_clock_freq + 500000) / 1000000); This would be clearer using DIV_ROUND_CLOSEST(cpu_clock_freq, 1000000). Thanks, Paul