1 #ifndef _ASM_X86_SMP_H_
2 #define _ASM_X86_SMP_H_
4 #include <linux/cpumask.h>
5 #include <linux/init.h>
7 extern cpumask_t cpu_callout_map;
9 extern int smp_num_siblings;
10 extern unsigned int num_processors;
13 void (*smp_prepare_boot_cpu)(void);
14 void (*smp_prepare_cpus)(unsigned max_cpus);
15 int (*cpu_up)(unsigned cpu);
16 void (*smp_cpus_done)(unsigned max_cpus);
18 void (*smp_send_stop)(void);
19 void (*smp_send_reschedule)(int cpu);
20 int (*smp_call_function_mask)(cpumask_t mask,
21 void (*func)(void *info), void *info,
25 /* Globals due to paravirt */
26 extern void set_cpu_sibling_map(int cpu);
29 extern struct smp_ops smp_ops;
31 static inline void smp_send_stop(void)
33 smp_ops.smp_send_stop();
36 static inline void smp_prepare_boot_cpu(void)
38 smp_ops.smp_prepare_boot_cpu();
41 static inline void smp_prepare_cpus(unsigned int max_cpus)
43 smp_ops.smp_prepare_cpus(max_cpus);
46 static inline void smp_cpus_done(unsigned int max_cpus)
48 smp_ops.smp_cpus_done(max_cpus);
51 static inline int __cpu_up(unsigned int cpu)
53 return smp_ops.cpu_up(cpu);
56 static inline void smp_send_reschedule(int cpu)
58 smp_ops.smp_send_reschedule(cpu);
61 static inline int smp_call_function_mask(cpumask_t mask,
62 void (*func) (void *info), void *info,
65 return smp_ops.smp_call_function_mask(mask, func, info, wait);
68 void native_smp_prepare_boot_cpu(void);
69 void native_smp_prepare_cpus(unsigned int max_cpus);
70 void native_smp_cpus_done(unsigned int max_cpus);
71 int native_cpu_up(unsigned int cpunum);
73 extern unsigned disabled_cpus;
74 extern void prefill_possible_map(void);
83 #ifdef CONFIG_HOTPLUG_CPU
84 extern void cpu_exit_clear(void);
85 extern void cpu_uninit(void);
86 extern void remove_siblinginfo(int cpu);
89 extern void smp_alloc_memory(void);
90 extern void lock_ipi_call_lock(void);
91 extern void unlock_ipi_call_lock(void);
92 #endif /* __ASSEMBLY__ */