hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/arch/x86/include/asm/processor.h
....@@ -682,6 +682,7 @@
682682 extern void load_fixmap_gdt(int);
683683 extern void load_percpu_segment(int);
684684 extern void cpu_init(void);
685
+extern void cpu_init_secondary(void);
685686 extern void cpu_init_exception_handling(void);
686687 extern void cr4_init(void);
687688
....@@ -807,9 +808,13 @@
807808 #ifdef CONFIG_CPU_SUP_AMD
808809 extern u16 amd_get_nb_id(int cpu);
809810 extern u32 amd_get_nodes_per_socket(void);
811
+extern bool cpu_has_ibpb_brtype_microcode(void);
812
+extern void amd_clear_divider(void);
810813 #else
811814 static inline u16 amd_get_nb_id(int cpu) { return 0; }
812815 static inline u32 amd_get_nodes_per_socket(void) { return 0; }
816
+static inline bool cpu_has_ibpb_brtype_microcode(void) { return false; }
817
+static inline void amd_clear_divider(void) { }
813818 #endif
814819
815820 static inline uint32_t hypervisor_cpuid_base(const char *sig, uint32_t leaves)
....@@ -838,8 +843,9 @@
838843 #define xen_set_default_idle 0
839844 #endif
840845
841
-void stop_this_cpu(void *dummy);
842
-void microcode_check(void);
846
+void __noreturn stop_this_cpu(void *dummy);
847
+void microcode_check(struct cpuinfo_x86 *prev_info);
848
+void store_cpu_caps(struct cpuinfo_x86 *info);
843849
844850 enum l1tf_mitigations {
845851 L1TF_MITIGATION_OFF,
....@@ -858,4 +864,6 @@
858864 MDS_MITIGATION_VMWERV,
859865 };
860866
867
+extern bool gds_ucode_mitigated(void);
868
+
861869 #endif /* _ASM_X86_PROCESSOR_H */