Linux Audio

Check our new training course

Loading...
v3.1
 
 1#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	int (*cpu_disable)(unsigned int cpu);
11	void (*cpu_die)(unsigned int cpu);
12	void (*play_dead)(void);
13};
14
15extern struct plat_smp_ops *mp_ops;
16extern struct plat_smp_ops shx3_smp_ops;
17
18#ifdef CONFIG_SMP
19
20static inline void plat_smp_setup(void)
21{
22	BUG_ON(!mp_ops);
23	mp_ops->smp_setup();
24}
25
26static inline void play_dead(void)
27{
28	mp_ops->play_dead();
 
29}
30
31extern void register_smp_ops(struct plat_smp_ops *ops);
32
33#else
34
35static inline void plat_smp_setup(void)
36{
37	/* UP, nothing to do ... */
38}
39
40static inline void register_smp_ops(struct plat_smp_ops *ops)
41{
42}
43
44static inline void play_dead(void)
45{
46	BUG();
47}
48
49#endif /* CONFIG_SMP */
50
51#endif /* __ASM_SH_SMP_OPS_H */
v6.8
 1/* SPDX-License-Identifier: GPL-2.0 */
 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);
11	int (*cpu_disable)(unsigned int cpu);
12	void (*cpu_die)(unsigned int cpu);
13	void (*play_dead)(void);
14};
15
16extern struct plat_smp_ops *mp_ops;
17extern struct plat_smp_ops shx3_smp_ops;
18
19#ifdef CONFIG_SMP
20
21static inline void plat_smp_setup(void)
22{
23	BUG_ON(!mp_ops);
24	mp_ops->smp_setup();
25}
26
27static inline void __noreturn play_dead(void)
28{
29	mp_ops->play_dead();
30	BUG();
31}
32
33extern void register_smp_ops(struct plat_smp_ops *ops);
34
35#else
36
37static inline void plat_smp_setup(void)
38{
39	/* UP, nothing to do ... */
40}
41
42static inline void register_smp_ops(struct plat_smp_ops *ops)
43{
44}
45
46static inline void __noreturn play_dead(void)
47{
48	BUG();
49}
50
51#endif /* CONFIG_SMP */
52
53#endif /* __ASM_SH_SMP_OPS_H */