1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/device.h>
7 #include <linux/topology.h>
8 #include <linux/nodemask.h>
9 #include <linux/percpu.h>
14 extern void prefill_possible_map(void);
16 #else /* CONFIG_SMP */
18 static inline void prefill_possible_map(void) {}
20 #define cpu_physical_id(cpu) boot_cpu_physical_apicid
21 #define cpu_acpi_id(cpu) 0
22 #define safe_smp_processor_id() 0
24 #endif /* CONFIG_SMP */
30 #ifdef CONFIG_HOTPLUG_CPU
31 extern void soft_restart_cpu(void);
34 extern void ap_init_aperfmperf(void);
36 int mwait_usable(const struct cpuinfo_x86 *);
38 unsigned int x86_family(unsigned int sig);
39 unsigned int x86_model(unsigned int sig);
40 unsigned int x86_stepping(unsigned int sig);
41 #ifdef CONFIG_CPU_SUP_INTEL
42 extern void __init sld_setup(struct cpuinfo_x86 *c);
43 extern bool handle_user_split_lock(struct pt_regs *regs, long error_code);
44 extern bool handle_guest_split_lock(unsigned long ip);
45 extern void handle_bus_lock(struct pt_regs *regs);
46 u8 get_this_hybrid_cpu_type(void);
48 static inline void __init sld_setup(struct cpuinfo_x86 *c) {}
49 static inline bool handle_user_split_lock(struct pt_regs *regs, long error_code)
54 static inline bool handle_guest_split_lock(unsigned long ip)
59 static inline void handle_bus_lock(struct pt_regs *regs) {}
61 static inline u8 get_this_hybrid_cpu_type(void)
66 #ifdef CONFIG_IA32_FEAT_CTL
67 void init_ia32_feat_ctl(struct cpuinfo_x86 *c);
69 static inline void init_ia32_feat_ctl(struct cpuinfo_x86 *c) {}
72 extern __noendbr void cet_disable(void);
74 struct ucode_cpu_info;
76 int intel_cpu_collect_info(struct ucode_cpu_info *uci);
78 static inline bool intel_cpu_signatures_match(unsigned int s1, unsigned int p1,
79 unsigned int s2, unsigned int p2)
84 /* Processor flags are either both 0 ... */
88 /* ... or they intersect. */
92 extern u64 x86_read_arch_cap_msr(void);
93 int intel_find_matching_signature(void *mc, unsigned int csig, int cpf);
94 int intel_microcode_sanity_check(void *mc, bool print_err, int hdr_type);
96 extern struct cpumask cpus_stop_mask;
98 #endif /* _ASM_X86_CPU_H */