Linux Audio

Check our new training course

Loading...
v4.6
 
 1#ifndef _ASM_X86_CPU_H
 2#define _ASM_X86_CPU_H
 3
 4#include <linux/device.h>
 5#include <linux/cpu.h>
 6#include <linux/topology.h>
 7#include <linux/nodemask.h>
 8#include <linux/percpu.h>
 
 9
10#ifdef CONFIG_SMP
11
12extern void prefill_possible_map(void);
13
14#else /* CONFIG_SMP */
15
16static inline void prefill_possible_map(void) {}
17
18#define cpu_physical_id(cpu)			boot_cpu_physical_apicid
 
19#define safe_smp_processor_id()			0
20#define stack_smp_processor_id()		0
21
22#endif /* CONFIG_SMP */
23
24struct x86_cpu {
25	struct cpu cpu;
26};
27
28#ifdef CONFIG_HOTPLUG_CPU
29extern int arch_register_cpu(int num);
30extern void arch_unregister_cpu(int);
31extern void start_cpu0(void);
32#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
33extern int _debug_hotplug_cpu(int cpu, int action);
34#endif
35#endif
36
 
 
37int mwait_usable(const struct cpuinfo_x86 *);
38
39unsigned int x86_family(unsigned int sig);
40unsigned int x86_model(unsigned int sig);
41unsigned int x86_stepping(unsigned int sig);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42#endif /* _ASM_X86_CPU_H */
v6.8
 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#ifdef CONFIG_SMP
13
14extern void prefill_possible_map(void);
15
16#else /* CONFIG_SMP */
17
18static inline void prefill_possible_map(void) {}
19
20#define cpu_physical_id(cpu)			boot_cpu_physical_apicid
21#define cpu_acpi_id(cpu)			0
22#define safe_smp_processor_id()			0
 
23
24#endif /* CONFIG_SMP */
25
 
 
 
 
26#ifdef CONFIG_HOTPLUG_CPU
27extern void soft_restart_cpu(void);
 
 
 
 
 
28#endif
29
30extern void ap_init_aperfmperf(void);
31
32int mwait_usable(const struct cpuinfo_x86 *);
33
34unsigned int x86_family(unsigned int sig);
35unsigned int x86_model(unsigned int sig);
36unsigned int x86_stepping(unsigned int sig);
37#ifdef CONFIG_CPU_SUP_INTEL
38extern void __init sld_setup(struct cpuinfo_x86 *c);
39extern bool handle_user_split_lock(struct pt_regs *regs, long error_code);
40extern bool handle_guest_split_lock(unsigned long ip);
41extern void handle_bus_lock(struct pt_regs *regs);
42u8 get_this_hybrid_cpu_type(void);
43#else
44static inline void __init sld_setup(struct cpuinfo_x86 *c) {}
45static inline bool handle_user_split_lock(struct pt_regs *regs, long error_code)
46{
47	return false;
48}
49
50static inline bool handle_guest_split_lock(unsigned long ip)
51{
52	return false;
53}
54
55static inline void handle_bus_lock(struct pt_regs *regs) {}
56
57static inline u8 get_this_hybrid_cpu_type(void)
58{
59	return 0;
60}
61#endif
62#ifdef CONFIG_IA32_FEAT_CTL
63void init_ia32_feat_ctl(struct cpuinfo_x86 *c);
64#else
65static inline void init_ia32_feat_ctl(struct cpuinfo_x86 *c) {}
66#endif
67
68extern __noendbr void cet_disable(void);
69
70struct cpu_signature;
71
72void intel_collect_cpu_info(struct cpu_signature *sig);
73
74extern u64 x86_read_arch_cap_msr(void);
75bool intel_find_matching_signature(void *mc, struct cpu_signature *sig);
76int intel_microcode_sanity_check(void *mc, bool print_err, int hdr_type);
77
78extern struct cpumask cpus_stop_mask;
79
80#endif /* _ASM_X86_CPU_H */