hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/mips/kernel/cpu-probe.c
....@@ -1721,7 +1721,10 @@
17211721
17221722 static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu)
17231723 {
1724
+ c->cputype = CPU_LOONGSON64;
1725
+
17241726 /* All Loongson processors covered here define ExcCode 16 as GSExc. */
1727
+ decode_configs(c);
17251728 c->options |= MIPS_CPU_GSEXCEX;
17261729
17271730 switch (c->processor_id & PRID_IMP_MASK) {
....@@ -1731,7 +1734,6 @@
17311734 case PRID_REV_LOONGSON2K_R1_1:
17321735 case PRID_REV_LOONGSON2K_R1_2:
17331736 case PRID_REV_LOONGSON2K_R1_3:
1734
- c->cputype = CPU_LOONGSON64;
17351737 __cpu_name[cpu] = "Loongson-2K";
17361738 set_elf_platform(cpu, "gs264e");
17371739 set_isa(c, MIPS_CPU_ISA_M64R2);
....@@ -1744,14 +1746,12 @@
17441746 switch (c->processor_id & PRID_REV_MASK) {
17451747 case PRID_REV_LOONGSON3A_R2_0:
17461748 case PRID_REV_LOONGSON3A_R2_1:
1747
- c->cputype = CPU_LOONGSON64;
17481749 __cpu_name[cpu] = "ICT Loongson-3";
17491750 set_elf_platform(cpu, "loongson3a");
17501751 set_isa(c, MIPS_CPU_ISA_M64R2);
17511752 break;
17521753 case PRID_REV_LOONGSON3A_R3_0:
17531754 case PRID_REV_LOONGSON3A_R3_1:
1754
- c->cputype = CPU_LOONGSON64;
17551755 __cpu_name[cpu] = "ICT Loongson-3";
17561756 set_elf_platform(cpu, "loongson3a");
17571757 set_isa(c, MIPS_CPU_ISA_M64R2);
....@@ -1771,7 +1771,6 @@
17711771 c->ases &= ~MIPS_ASE_VZ; /* VZ of Loongson-3A2000/3000 is incomplete */
17721772 break;
17731773 case PRID_IMP_LOONGSON_64G:
1774
- c->cputype = CPU_LOONGSON64;
17751774 __cpu_name[cpu] = "ICT Loongson-3";
17761775 set_elf_platform(cpu, "loongson3a");
17771776 set_isa(c, MIPS_CPU_ISA_M64R2);
....@@ -1781,8 +1780,6 @@
17811780 panic("Unknown Loongson Processor ID!");
17821781 break;
17831782 }
1784
-
1785
- decode_configs(c);
17861783 }
17871784 #else
17881785 static inline void cpu_probe_loongson(struct cpuinfo_mips *c, unsigned int cpu) { }