xref: /freebsd/sys/arm/include/smp.h (revision 076ad2f8)
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 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,		/* Not used now, but keep it reserved. */
18 	IPI_CACHE,		/* Not used now, but keep it reserved. */
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	/* Not used now, but keep it reserved. */
29 #define IPI_CACHE	8	/* Not used now, but keep it reserved. */
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 #ifndef INTRNG
41 void	pic_ipi_send(cpuset_t cpus, u_int ipi);
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 void	platform_mp_start_ap(void);
49 
50 /* global data in mp_machdep.c */
51 extern struct pcb               stoppcbs[];
52 
53 #endif /* !_MACHINE_SMP_H_ */
54