blob: 0581b2a4c8ce700cb675a253e254b81b30fac514 [file] [log] [blame]
Paul Mundt3366e352010-03-30 12:38:01 +09001#ifndef __ASM_SH_SMP_OPS_H
2#define __ASM_SH_SMP_OPS_H
3
4struct plat_smp_ops {
5 void (*smp_setup)(void);
6 unsigned int (*smp_processor_id)(void);
7 void (*prepare_cpus)(unsigned int max_cpus);
8 void (*start_cpu)(unsigned int cpu, unsigned long entry_point);
9 void (*send_ipi)(unsigned int cpu, unsigned int message);
10};
11
12extern struct plat_smp_ops shx3_smp_ops;
13
14#ifdef CONFIG_SMP
15
16static inline void plat_smp_setup(void)
17{
18 extern struct plat_smp_ops *mp_ops; /* private */
19
20 BUG_ON(!mp_ops);
21 mp_ops->smp_setup();
22}
23
24extern void register_smp_ops(struct plat_smp_ops *ops);
25
26#else
27
28static inline void plat_smp_setup(void)
29{
30 /* UP, nothing to do ... */
31}
32
33static inline void register_smp_ops(struct plat_smp_ops *ops)
34{
35}
36
37#endif /* CONFIG_SMP */
38
39#endif /* __ASM_SH_SMP_OPS_H */