Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 2 | #ifndef _ASM_X86_CPU_H |
| 3 | #define _ASM_X86_CPU_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | |
| 5 | #include <linux/device.h> |
| 6 | #include <linux/cpu.h> |
| 7 | #include <linux/topology.h> |
| 8 | #include <linux/nodemask.h> |
Zwane Mwaikambo | f370513 | 2005-06-25 14:54:50 -0700 | [diff] [blame] | 9 | #include <linux/percpu.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | |
Jaswinder Singh Rajput | 6e5385d | 2009-01-07 18:11:35 +0530 | [diff] [blame] | 11 | #ifdef CONFIG_SMP |
| 12 | |
| 13 | extern void prefill_possible_map(void); |
| 14 | |
| 15 | #else /* CONFIG_SMP */ |
| 16 | |
| 17 | static inline void prefill_possible_map(void) {} |
| 18 | |
Jaswinder Singh Rajput | af8968a | 2009-01-07 21:37:33 +0530 | [diff] [blame] | 19 | #define cpu_physical_id(cpu) boot_cpu_physical_apicid |
Vitaly Kuznetsov | 3e9e57f | 2016-06-30 17:56:36 +0200 | [diff] [blame] | 20 | #define cpu_acpi_id(cpu) 0 |
Jaswinder Singh Rajput | 96b89dc6 | 2009-01-07 21:35:48 +0530 | [diff] [blame] | 21 | #define safe_smp_processor_id() 0 |
Jaswinder Singh Rajput | f472cdb | 2009-01-07 21:34:25 +0530 | [diff] [blame] | 22 | |
Jaswinder Singh Rajput | 6e5385d | 2009-01-07 18:11:35 +0530 | [diff] [blame] | 23 | #endif /* CONFIG_SMP */ |
| 24 | |
travis@sgi.com | 30964d5 | 2008-01-30 13:33:11 +0100 | [diff] [blame] | 25 | struct x86_cpu { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 | struct cpu cpu; |
| 27 | }; |
Alexander van Heukelum | d987402 | 2008-02-01 17:49:43 +0100 | [diff] [blame] | 28 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | #ifdef CONFIG_HOTPLUG_CPU |
Alexander van Heukelum | d987402 | 2008-02-01 17:49:43 +0100 | [diff] [blame] | 30 | extern int arch_register_cpu(int num); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | extern void arch_unregister_cpu(int); |
Paul Gortmaker | 148f9bb | 2013-06-18 18:23:59 -0400 | [diff] [blame] | 32 | extern void start_cpu0(void); |
Fenghua Yu | a71c8bc | 2012-11-13 11:32:51 -0800 | [diff] [blame] | 33 | #ifdef CONFIG_DEBUG_HOTPLUG_CPU0 |
| 34 | extern int _debug_hotplug_cpu(int cpu, int action); |
| 35 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | #endif |
| 37 | |
Borislav Petkov | 1c9d16e | 2011-02-11 18:17:54 +0100 | [diff] [blame] | 38 | int mwait_usable(const struct cpuinfo_x86 *); |
Jaswinder Singh Rajput | 6d652ea | 2009-01-07 21:38:59 +0530 | [diff] [blame] | 39 | |
Borislav Petkov | 99f925c | 2015-11-23 11:12:21 +0100 | [diff] [blame] | 40 | unsigned int x86_family(unsigned int sig); |
| 41 | unsigned int x86_model(unsigned int sig); |
| 42 | unsigned int x86_stepping(unsigned int sig); |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 43 | #endif /* _ASM_X86_CPU_H */ |