]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - include/asm-x86/smp.h
x86: move disabled_cpus to common header
[linux-2.6-omap-h63xx.git] / include / asm-x86 / smp.h
1 #ifndef _ASM_X86_SMP_H_
2 #define _ASM_X86_SMP_H_
3 #ifndef __ASSEMBLY__
4 #include <linux/cpumask.h>
5 #include <linux/init.h>
6
7 extern cpumask_t cpu_callout_map;
8
9 extern int smp_num_siblings;
10 extern unsigned int num_processors;
11
12 struct smp_ops {
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);
17
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,
22                                       int wait);
23 };
24
25 #ifdef CONFIG_SMP
26 extern struct smp_ops smp_ops;
27
28 static inline void smp_prepare_boot_cpu(void)
29 {
30         smp_ops.smp_prepare_boot_cpu();
31 }
32
33 static inline void smp_prepare_cpus(unsigned int max_cpus)
34 {
35         smp_ops.smp_prepare_cpus(max_cpus);
36 }
37
38 static inline void smp_cpus_done(unsigned int max_cpus)
39 {
40         smp_ops.smp_cpus_done(max_cpus);
41 }
42
43 static inline int __cpu_up(unsigned int cpu)
44 {
45         return smp_ops.cpu_up(cpu);
46 }
47
48 static inline void smp_send_reschedule(int cpu)
49 {
50         smp_ops.smp_send_reschedule(cpu);
51 }
52
53 static inline int smp_call_function_mask(cpumask_t mask,
54                                          void (*func) (void *info), void *info,
55                                          int wait)
56 {
57         return smp_ops.smp_call_function_mask(mask, func, info, wait);
58 }
59
60 void native_smp_prepare_boot_cpu(void);
61 void native_smp_prepare_cpus(unsigned int max_cpus);
62 void native_smp_cpus_done(unsigned int max_cpus);
63 int native_cpu_up(unsigned int cpunum);
64
65 extern unsigned disabled_cpus;
66 #endif
67
68 #ifdef CONFIG_X86_32
69 # include "smp_32.h"
70 #else
71 # include "smp_64.h"
72 #endif
73
74 extern void smp_alloc_memory(void);
75 extern void lock_ipi_call_lock(void);
76 extern void unlock_ipi_call_lock(void);
77 #endif /* __ASSEMBLY__ */
78 #endif