6 #include <asm/percpu.h>
11 #ifdef CONFIG_X86_LOCAL_APIC
13 # include <asm/apic.h>
14 # ifdef CONFIG_X86_IO_APIC
18 #include <asm/thread_info.h>
20 #include <asm/cpufeature.h>
25 static inline bool cpu_has_ht_siblings(
void)
27 bool has_siblings =
false;
41 static inline struct cpumask *cpu_sibling_mask(
int cpu)
43 return per_cpu(cpu_sibling_map, cpu);
46 static inline struct cpumask *cpu_core_mask(
int cpu)
51 static inline struct cpumask *cpu_llc_shared_mask(
int cpu)
53 return per_cpu(cpu_llc_shared_map, cpu);
58 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
88 #ifndef CONFIG_PARAVIRT
89 #define startup_ipi_hook(phys_apicid, start_eip, start_esp) do { } while (0)
128 static inline void __cpu_die(
unsigned int cpu)
153 void cpu_disable_common(
void);
161 void play_dead_common(
void);
170 #define cpu_physical_id(cpu) per_cpu(x86_cpu_to_apicid, cpu)
173 #define wbinvd_on_cpu(cpu) wbinvd()
183 #ifdef CONFIG_X86_32_SMP
189 #define raw_smp_processor_id() (this_cpu_read(cpu_number))
192 #elif defined(CONFIG_X86_64_SMP)
193 #define raw_smp_processor_id() (this_cpu_read(cpu_number))
195 #define stack_smp_processor_id() \
197 struct thread_info *ti; \
198 __asm__("andq %%rsp,%0; ":"=r" (ti) : "0" (CURRENT_MASK)); \
201 #define safe_smp_processor_id() smp_processor_id()
205 #ifdef CONFIG_X86_LOCAL_APIC
207 #ifndef CONFIG_X86_64
208 static inline int logical_smp_processor_id(
void)
221 # define hard_smp_processor_id() 0
226 #ifdef CONFIG_DEBUG_NMI_SELFTEST
229 #define nmi_selftest() do { } while (0)