forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/arch/x86/kernel/cpu/cpu.h
....@@ -14,7 +14,6 @@
1414 void (*c_init)(struct cpuinfo_x86 *);
1515 void (*c_identify)(struct cpuinfo_x86 *);
1616 void (*c_detect_tlb)(struct cpuinfo_x86 *);
17
- void (*c_bsp_resume)(struct cpuinfo_x86 *);
1817 int c_x86_vendor;
1918 #ifdef CONFIG_X86_32
2019 /* Optional vendor specific routine to obtain the cache size. */
....@@ -39,7 +38,7 @@
3938
4039 #define cpu_dev_register(cpu_devX) \
4140 static const struct cpu_dev *const __cpu_dev_##cpu_devX __used \
42
- __attribute__((__section__(".x86_cpu_dev.init"))) = \
41
+ __section(".x86_cpu_dev.init") = \
4342 &cpu_devX;
4443
4544 extern const struct cpu_dev *const __x86_cpu_dev_start[],
....@@ -61,15 +60,15 @@
6160 static inline void tsx_init(void) { }
6261 #endif /* CONFIG_CPU_SUP_INTEL */
6362
63
+extern void init_spectral_chicken(struct cpuinfo_x86 *c);
64
+
6465 extern void get_cpu_cap(struct cpuinfo_x86 *c);
6566 extern void get_cpu_address_sizes(struct cpuinfo_x86 *c);
6667 extern void cpu_detect_cache_sizes(struct cpuinfo_x86 *c);
6768 extern void init_scattered_cpuid_features(struct cpuinfo_x86 *c);
68
-extern u32 get_scattered_cpuid_leaf(unsigned int level,
69
- unsigned int sub_leaf,
70
- enum cpuid_regs_idx reg);
7169 extern void init_intel_cacheinfo(struct cpuinfo_x86 *c);
7270 extern void init_amd_cacheinfo(struct cpuinfo_x86 *c);
71
+extern void init_hygon_cacheinfo(struct cpuinfo_x86 *c);
7372
7473 extern void detect_num_cpu_cores(struct cpuinfo_x86 *c);
7574 extern int detect_extended_topology_early(struct cpuinfo_x86 *c);
....@@ -79,9 +78,11 @@
7978 extern void check_null_seg_clears_base(struct cpuinfo_x86 *c);
8079
8180 unsigned int aperfmperf_get_khz(int cpu);
81
+void cpu_select_mitigations(void);
8282
8383 extern void x86_spec_ctrl_setup_ap(void);
8484 extern void update_srbds_msr(void);
85
+extern void update_gds_msr(void);
8586
8687 extern u64 x86_read_arch_cap_msr(void);
8788