File Index
Files and directories
Sign in
FILE

cpu.h

File preview with syntax highlighting.

linux-6.19.14/arch/x86/include/asm/cpu.h C
 1/* SPDX-License-Identifier: GPL-2.0 */
 2#ifndef _ASM_X86_CPU_H
 3#define _ASM_X86_CPU_H
 4
 5#include <linux/device.h>
 6#include <linux/cpu.h>
 7#include <linux/topology.h>
 8#include <linux/nodemask.h>
 9#include <linux/percpu.h>
10#include <asm/ibt.h>
11
12#ifndef CONFIG_SMP
13#define cpu_physical_id(cpu)			boot_cpu_physical_apicid
14#define cpu_acpi_id(cpu)			0
15#endif /* CONFIG_SMP */
16
17#ifdef CONFIG_HOTPLUG_CPU
18extern void soft_restart_cpu(void);
19#endif
20
21extern void ap_init_aperfmperf(void);
22
23int mwait_usable(const struct cpuinfo_x86 *);
24
25unsigned int x86_family(unsigned int sig);
26unsigned int x86_model(unsigned int sig);
27unsigned int x86_stepping(unsigned int sig);
28#ifdef CONFIG_X86_BUS_LOCK_DETECT
29extern void __init sld_setup(struct cpuinfo_x86 *c);
30extern bool handle_user_split_lock(struct pt_regs *regs, long error_code);
31extern bool handle_guest_split_lock(unsigned long ip);
32extern void handle_bus_lock(struct pt_regs *regs);
33void split_lock_init(void);
34void bus_lock_init(void);
35#else
36static inline void __init sld_setup(struct cpuinfo_x86 *c) {}
37static inline bool handle_user_split_lock(struct pt_regs *regs, long error_code)
38{
39	return false;
40}
41
42static inline bool handle_guest_split_lock(unsigned long ip)
43{
44	return false;
45}
46
47static inline void handle_bus_lock(struct pt_regs *regs) {}
48static inline void split_lock_init(void) {}
49static inline void bus_lock_init(void) {}
50#endif
51
52#ifdef CONFIG_IA32_FEAT_CTL
53void init_ia32_feat_ctl(struct cpuinfo_x86 *c);
54#else
55static inline void init_ia32_feat_ctl(struct cpuinfo_x86 *c) {}
56#endif
57
58extern __noendbr void cet_disable(void);
59
60struct cpu_signature;
61
62void intel_collect_cpu_info(struct cpu_signature *sig);
63
64extern u64 x86_read_arch_cap_msr(void);
65bool intel_find_matching_signature(void *mc, struct cpu_signature *sig);
66int intel_microcode_sanity_check(void *mc, bool print_err, int hdr_type);
67
68extern struct cpumask cpus_stop_mask;
69
70#endif /* _ASM_X86_CPU_H */
~/ Read-only file preview.