]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/sh/include/asm/smp-ops.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / arch / sh / include / asm / smp-ops.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
3366e358
PM
2#ifndef __ASM_SH_SMP_OPS_H
3#define __ASM_SH_SMP_OPS_H
4
5struct 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);
763142d1
PM
11 int (*cpu_disable)(unsigned int cpu);
12 void (*cpu_die)(unsigned int cpu);
13 void (*play_dead)(void);
3366e358
PM
14};
15
763142d1 16extern struct plat_smp_ops *mp_ops;
3366e358
PM
17extern struct plat_smp_ops shx3_smp_ops;
18
19#ifdef CONFIG_SMP
20
21static inline void plat_smp_setup(void)
22{
3366e358
PM
23 BUG_ON(!mp_ops);
24 mp_ops->smp_setup();
25}
26
763142d1
PM
27static inline void play_dead(void)
28{
29 mp_ops->play_dead();
30}
31
3366e358
PM
32extern void register_smp_ops(struct plat_smp_ops *ops);
33
34#else
35
36static inline void plat_smp_setup(void)
37{
38 /* UP, nothing to do ... */
39}
40
41static inline void register_smp_ops(struct plat_smp_ops *ops)
42{
43}
44
763142d1
PM
45static inline void play_dead(void)
46{
47 BUG();
48}
49
3366e358
PM
50#endif /* CONFIG_SMP */
51
52#endif /* __ASM_SH_SMP_OPS_H */