xref: /freebsd/sys/arm/include/smp.h (revision a0ee8cc6)
1 /* $FreeBSD$ */
2 
3 #ifndef _MACHINE_SMP_H_
4 #define _MACHINE_SMP_H_
5 
6 #include <sys/_cpuset.h>
7 #include <machine/pcb.h>
8 
9 #ifdef ARM_INTRNG
10 enum {
11 	IPI_AST,
12 	IPI_PREEMPT,
13 	IPI_RENDEZVOUS,
14 	IPI_STOP,
15 	IPI_STOP_HARD = IPI_STOP, /* These are synonyms on arm. */
16 	IPI_HARDCLOCK,
17 	IPI_TLB,
18 	IPI_CACHE,
19 	INTR_IPI_COUNT
20 };
21 #else
22 #define IPI_AST		0
23 #define IPI_PREEMPT	2
24 #define IPI_RENDEZVOUS	3
25 #define IPI_STOP	4
26 #define IPI_STOP_HARD	4
27 #define IPI_HARDCLOCK	6
28 #define IPI_TLB		7
29 #define IPI_CACHE	8
30 #endif /* INTRNG */
31 
32 void	init_secondary(int cpu);
33 void	mpentry(void);
34 
35 void	ipi_all_but_self(u_int ipi);
36 void	ipi_cpu(int cpu, u_int ipi);
37 void	ipi_selected(cpuset_t cpus, u_int ipi);
38 
39 /* PIC interface */
40 void	pic_ipi_send(cpuset_t cpus, u_int ipi);
41 #ifndef ARM_INTRNG
42 void	pic_ipi_clear(int ipi);
43 int	pic_ipi_read(int arg);
44 #endif
45 
46 /* Platform interface */
47 void	platform_mp_setmaxid(void);
48 int	platform_mp_probe(void);
49 void	platform_mp_start_ap(void);
50 void	platform_mp_init_secondary(void);
51 
52 void	platform_ipi_send(cpuset_t cpus, u_int ipi);
53 
54 /* global data in mp_machdep.c */
55 extern struct pcb               stoppcbs[];
56 
57 #endif /* !_MACHINE_SMP_H_ */
58