Linux Audio

Check our new training course

Loading...
v4.17
 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
11#ifdef CONFIG_SMP
12
13extern void prefill_possible_map(void);
14
15#else /* CONFIG_SMP */
16
17static inline void prefill_possible_map(void) {}
18
19#define cpu_physical_id(cpu)			boot_cpu_physical_apicid
20#define cpu_acpi_id(cpu)			0
21#define safe_smp_processor_id()			0
22
23#endif /* CONFIG_SMP */
24
25struct x86_cpu {
26	struct cpu cpu;
27};
28
29#ifdef CONFIG_HOTPLUG_CPU
30extern int arch_register_cpu(int num);
31extern void arch_unregister_cpu(int);
32extern void start_cpu0(void);
33#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
34extern int _debug_hotplug_cpu(int cpu, int action);
35#endif
36#endif
37
38int mwait_usable(const struct cpuinfo_x86 *);
39
40unsigned int x86_family(unsigned int sig);
41unsigned int x86_model(unsigned int sig);
42unsigned int x86_stepping(unsigned int sig);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43#endif /* _ASM_X86_CPU_H */
v5.9
 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
11#ifdef CONFIG_SMP
12
13extern void prefill_possible_map(void);
14
15#else /* CONFIG_SMP */
16
17static inline void prefill_possible_map(void) {}
18
19#define cpu_physical_id(cpu)			boot_cpu_physical_apicid
20#define cpu_acpi_id(cpu)			0
21#define safe_smp_processor_id()			0
22
23#endif /* CONFIG_SMP */
24
25struct x86_cpu {
26	struct cpu cpu;
27};
28
29#ifdef CONFIG_HOTPLUG_CPU
30extern int arch_register_cpu(int num);
31extern void arch_unregister_cpu(int);
32extern void start_cpu0(void);
33#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
34extern int _debug_hotplug_cpu(int cpu, int action);
35#endif
36#endif
37
38int mwait_usable(const struct cpuinfo_x86 *);
39
40unsigned int x86_family(unsigned int sig);
41unsigned int x86_model(unsigned int sig);
42unsigned int x86_stepping(unsigned int sig);
43#ifdef CONFIG_CPU_SUP_INTEL
44extern void __init cpu_set_core_cap_bits(struct cpuinfo_x86 *c);
45extern void switch_to_sld(unsigned long tifn);
46extern bool handle_user_split_lock(struct pt_regs *regs, long error_code);
47extern bool handle_guest_split_lock(unsigned long ip);
48#else
49static inline void __init cpu_set_core_cap_bits(struct cpuinfo_x86 *c) {}
50static inline void switch_to_sld(unsigned long tifn) {}
51static inline bool handle_user_split_lock(struct pt_regs *regs, long error_code)
52{
53	return false;
54}
55
56static inline bool handle_guest_split_lock(unsigned long ip)
57{
58	return false;
59}
60#endif
61#ifdef CONFIG_IA32_FEAT_CTL
62void init_ia32_feat_ctl(struct cpuinfo_x86 *c);
63#else
64static inline void init_ia32_feat_ctl(struct cpuinfo_x86 *c) {}
65#endif
66#endif /* _ASM_X86_CPU_H */