xref: /openbmc/linux/arch/x86/xen/smp.h (revision fedf429e)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _XEN_SMP_H
3 
4 #ifdef CONFIG_SMP
5 
6 void asm_cpu_bringup_and_idle(void);
7 asmlinkage void cpu_bringup_and_idle(void);
8 
9 extern void xen_send_IPI_mask(const struct cpumask *mask,
10 			      int vector);
11 extern void xen_send_IPI_mask_allbutself(const struct cpumask *mask,
12 				int vector);
13 extern void xen_send_IPI_allbutself(int vector);
14 extern void xen_send_IPI_all(int vector);
15 extern void xen_send_IPI_self(int vector);
16 
17 extern int xen_smp_intr_init(unsigned int cpu);
18 extern void xen_smp_intr_free(unsigned int cpu);
19 int xen_smp_intr_init_pv(unsigned int cpu);
20 void xen_smp_intr_free_pv(unsigned int cpu);
21 
22 void xen_smp_cpus_done(unsigned int max_cpus);
23 
24 void xen_smp_send_reschedule(int cpu);
25 void xen_smp_send_call_function_ipi(const struct cpumask *mask);
26 void xen_smp_send_call_function_single_ipi(int cpu);
27 
28 void __noreturn xen_cpu_bringup_again(unsigned long stack);
29 
30 struct xen_common_irq {
31 	int irq;
32 	char *name;
33 };
34 #else /* CONFIG_SMP */
35 
36 static inline int xen_smp_intr_init(unsigned int cpu)
37 {
38 	return 0;
39 }
40 static inline void xen_smp_intr_free(unsigned int cpu) {}
41 
42 static inline int xen_smp_intr_init_pv(unsigned int cpu)
43 {
44 	return 0;
45 }
46 static inline void xen_smp_intr_free_pv(unsigned int cpu) {}
47 #endif /* CONFIG_SMP */
48 
49 #endif
50