blob: adc6cc86b06201761a2a19e2fcdb306d631241be [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
H. Peter Anvin1965aae2008-10-22 22:26:29 -07002#ifndef _ASM_X86_CPU_H
3#define _ASM_X86_CPU_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
5#include <linux/device.h>
6#include <linux/cpu.h>
7#include <linux/topology.h>
8#include <linux/nodemask.h>
Zwane Mwaikambof3705132005-06-25 14:54:50 -07009#include <linux/percpu.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070010
Jaswinder Singh Rajput6e5385d2009-01-07 18:11:35 +053011#ifdef CONFIG_SMP
12
13extern void prefill_possible_map(void);
14
15#else /* CONFIG_SMP */
16
17static inline void prefill_possible_map(void) {}
18
Jaswinder Singh Rajputaf8968a2009-01-07 21:37:33 +053019#define cpu_physical_id(cpu) boot_cpu_physical_apicid
Vitaly Kuznetsov3e9e57f2016-06-30 17:56:36 +020020#define cpu_acpi_id(cpu) 0
Jaswinder Singh Rajput96b89dc62009-01-07 21:35:48 +053021#define safe_smp_processor_id() 0
Jaswinder Singh Rajputf472cdb2009-01-07 21:34:25 +053022
Jaswinder Singh Rajput6e5385d2009-01-07 18:11:35 +053023#endif /* CONFIG_SMP */
24
travis@sgi.com30964d52008-01-30 13:33:11 +010025struct x86_cpu {
Linus Torvalds1da177e2005-04-16 15:20:36 -070026 struct cpu cpu;
27};
Alexander van Heukelumd9874022008-02-01 17:49:43 +010028
Linus Torvalds1da177e2005-04-16 15:20:36 -070029#ifdef CONFIG_HOTPLUG_CPU
Alexander van Heukelumd9874022008-02-01 17:49:43 +010030extern int arch_register_cpu(int num);
Linus Torvalds1da177e2005-04-16 15:20:36 -070031extern void arch_unregister_cpu(int);
Paul Gortmaker148f9bb2013-06-18 18:23:59 -040032extern void start_cpu0(void);
Fenghua Yua71c8bc2012-11-13 11:32:51 -080033#ifdef CONFIG_DEBUG_HOTPLUG_CPU0
34extern int _debug_hotplug_cpu(int cpu, int action);
35#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070036#endif
37
Borislav Petkov1c9d16e2011-02-11 18:17:54 +010038int mwait_usable(const struct cpuinfo_x86 *);
Jaswinder Singh Rajput6d652ea2009-01-07 21:38:59 +053039
Borislav Petkov99f925c2015-11-23 11:12:21 +010040unsigned int x86_family(unsigned int sig);
41unsigned int x86_model(unsigned int sig);
42unsigned int x86_stepping(unsigned int sig);
H. Peter Anvin1965aae2008-10-22 22:26:29 -070043#endif /* _ASM_X86_CPU_H */