aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-i386/smp.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 9cab1531c613..2d083cb4ca93 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -49,6 +49,59 @@ extern void cpu_exit_clear(void);
49extern void cpu_uninit(void); 49extern void cpu_uninit(void);
50#endif 50#endif
51 51
52struct smp_ops
53{
54 void (*smp_prepare_boot_cpu)(void);
55 void (*smp_prepare_cpus)(unsigned max_cpus);
56 int (*cpu_up)(unsigned cpu);
57 void (*smp_cpus_done)(unsigned max_cpus);
58
59 void (*smp_send_stop)(void);
60 void (*smp_send_reschedule)(int cpu);
61 int (*smp_call_function_mask)(cpumask_t mask,
62 void (*func)(void *info), void *info,
63 int wait);
64};
65
66extern struct smp_ops smp_ops;
67
68static inline void smp_prepare_boot_cpu(void)
69{
70 smp_ops.smp_prepare_boot_cpu();
71}
72static inline void smp_prepare_cpus(unsigned int max_cpus)
73{
74 smp_ops.smp_prepare_cpus(max_cpus);
75}
76static inline int __cpu_up(unsigned int cpu)
77{
78 return smp_ops.cpu_up(cpu);
79}
80static inline void smp_cpus_done(unsigned int max_cpus)
81{
82 smp_ops.smp_cpus_done(max_cpus);
83}
84
85static inline void smp_send_stop(void)
86{
87 smp_ops.smp_send_stop();
88}
89static inline void smp_send_reschedule(int cpu)
90{
91 smp_ops.smp_send_reschedule(cpu);
92}
93static inline int smp_call_function_mask(cpumask_t mask,
94 void (*func) (void *info), void *info,
95 int wait)
96{
97 return smp_ops.smp_call_function_mask(mask, func, info, wait);
98}
99
100void native_smp_prepare_boot_cpu(void);
101void native_smp_prepare_cpus(unsigned int max_cpus);
102int native_cpu_up(unsigned int cpunum);
103void native_smp_cpus_done(unsigned int max_cpus);
104
52#ifndef CONFIG_PARAVIRT 105#ifndef CONFIG_PARAVIRT
53#define startup_ipi_hook(phys_apicid, start_eip, start_esp) \ 106#define startup_ipi_hook(phys_apicid, start_eip, start_esp) \
54do { } while (0) 107do { } while (0)