forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/mips/include/asm/cpu-info.h
....@@ -105,6 +105,15 @@
105105 unsigned int gtoffset_mask;
106106 unsigned int guestid_mask;
107107 unsigned int guestid_cache;
108
+
109
+#ifdef CONFIG_CPU_LOONGSON3_CPUCFG_EMULATION
110
+ /* CPUCFG data for this CPU, synthesized at probe time.
111
+ *
112
+ * CPUCFG select 0 is PRId, 4 and above are unimplemented for now.
113
+ * So the only stored values are for CPUCFG selects 1-3 inclusive.
114
+ */
115
+ u32 loongson3_cpucfg_data[3];
116
+#endif
108117 } __attribute__((aligned(SMP_CACHE_BYTES)));
109118
110119 extern struct cpuinfo_mips cpu_data[];
....@@ -142,7 +151,7 @@
142151 static inline unsigned int cpu_cluster(struct cpuinfo_mips *cpuinfo)
143152 {
144153 /* Optimisation for systems where multiple clusters aren't used */
145
- if (!IS_ENABLED(CONFIG_CPU_MIPSR6))
154
+ if (!IS_ENABLED(CONFIG_CPU_MIPSR5) && !IS_ENABLED(CONFIG_CPU_MIPSR6))
146155 return 0;
147156
148157 return (cpuinfo->globalnumber & MIPS_GLOBALNUMBER_CLUSTER) >>