Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #ifndef __ASM_SH_SMP_OPS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) #define __ASM_SH_SMP_OPS_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) struct plat_smp_ops {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) 	void (*smp_setup)(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 	unsigned int (*smp_processor_id)(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) 	void (*prepare_cpus)(unsigned int max_cpus);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) 	void (*start_cpu)(unsigned int cpu, unsigned long entry_point);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 	void (*send_ipi)(unsigned int cpu, unsigned int message);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) 	int (*cpu_disable)(unsigned int cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) 	void (*cpu_die)(unsigned int cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 	void (*play_dead)(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) extern struct plat_smp_ops *mp_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) extern struct plat_smp_ops shx3_smp_ops;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #ifdef CONFIG_SMP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) static inline void plat_smp_setup(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	BUG_ON(!mp_ops);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	mp_ops->smp_setup();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) static inline void play_dead(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	mp_ops->play_dead();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern void register_smp_ops(struct plat_smp_ops *ops);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) static inline void plat_smp_setup(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 	/* UP, nothing to do ... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) static inline void register_smp_ops(struct plat_smp_ops *ops)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) static inline void play_dead(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) 	BUG();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) #endif /* CONFIG_SMP */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #endif /* __ASM_SH_SMP_OPS_H */