Merge tag 'locking-urgent-2020-12-27' of git://git.kernel.org/pub/scm/linux/kernel...
[linux/fpc-iii.git] / arch / sh / include / asm / smp-ops.h
blobe27702130eb6f3b0e1dfcc98c0088868c2046272
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_SH_SMP_OPS_H
3 #define __ASM_SH_SMP_OPS_H
5 struct plat_smp_ops {
6 void (*smp_setup)(void);
7 unsigned int (*smp_processor_id)(void);
8 void (*prepare_cpus)(unsigned int max_cpus);
9 void (*start_cpu)(unsigned int cpu, unsigned long entry_point);
10 void (*send_ipi)(unsigned int cpu, unsigned int message);
11 int (*cpu_disable)(unsigned int cpu);
12 void (*cpu_die)(unsigned int cpu);
13 void (*play_dead)(void);
16 extern struct plat_smp_ops *mp_ops;
17 extern struct plat_smp_ops shx3_smp_ops;
19 #ifdef CONFIG_SMP
21 static inline void plat_smp_setup(void)
23 BUG_ON(!mp_ops);
24 mp_ops->smp_setup();
27 static inline void play_dead(void)
29 mp_ops->play_dead();
32 extern void register_smp_ops(struct plat_smp_ops *ops);
34 #else
36 static inline void plat_smp_setup(void)
38 /* UP, nothing to do ... */
41 static inline void register_smp_ops(struct plat_smp_ops *ops)
45 static inline void play_dead(void)
47 BUG();
50 #endif /* CONFIG_SMP */
52 #endif /* __ASM_SH_SMP_OPS_H */