Paul Mundt | 3366e35 | 2010-03-30 12:38:01 +0900 | [diff] [blame^] | 1 | #ifndef __ASM_SH_SMP_OPS_H |
| 2 | #define __ASM_SH_SMP_OPS_H |
| 3 | |
| 4 | struct 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 | |
| 12 | extern struct plat_smp_ops shx3_smp_ops; |
| 13 | |
| 14 | #ifdef CONFIG_SMP |
| 15 | |
| 16 | static 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 | |
| 24 | extern void register_smp_ops(struct plat_smp_ops *ops); |
| 25 | |
| 26 | #else |
| 27 | |
| 28 | static inline void plat_smp_setup(void) |
| 29 | { |
| 30 | /* UP, nothing to do ... */ |
| 31 | } |
| 32 | |
| 33 | static 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 */ |