xref: /freebsd/sys/arm64/include/smp.h (revision 95ee2897e98f5d444f26ed2334cc7c439f9c16c6)
1b2b55077SAndrew Turner /*-
2b2b55077SAndrew Turner  * Copyright (c) 2014 Andrew Turner <andrew@FreeBSD.org>
3b2b55077SAndrew Turner  * Copyright (c) 2015 The FreeBSD Foundation
4b2b55077SAndrew Turner  * All rights reserved.
5b2b55077SAndrew Turner  *
6b2b55077SAndrew Turner  * This software was developed by Andrew Turner under sponsorship from
7b2b55077SAndrew Turner  * the FreeBSD Foundation.
8b2b55077SAndrew Turner  *
9b2b55077SAndrew Turner  * Redistribution and use in source and binary forms, with or without
10b2b55077SAndrew Turner  * modification, are permitted provided that the following conditions
11b2b55077SAndrew Turner  * are met:
12b2b55077SAndrew Turner  * 1. Redistributions of source code must retain the above copyright
13b2b55077SAndrew Turner  *    notice, this list of conditions and the following disclaimer.
14b2b55077SAndrew Turner  * 2. Redistributions in binary form must reproduce the above copyright
15b2b55077SAndrew Turner  *    notice, this list of conditions and the following disclaimer in the
16b2b55077SAndrew Turner  *    documentation and/or other materials provided with the distribution.
17b2b55077SAndrew Turner  *
18b2b55077SAndrew Turner  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
19b2b55077SAndrew Turner  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20b2b55077SAndrew Turner  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21b2b55077SAndrew Turner  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
22b2b55077SAndrew Turner  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23b2b55077SAndrew Turner  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24b2b55077SAndrew Turner  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25b2b55077SAndrew Turner  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26b2b55077SAndrew Turner  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27b2b55077SAndrew Turner  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28b2b55077SAndrew Turner  * SUCH DAMAGE.
29b2b55077SAndrew Turner  */
30b2b55077SAndrew Turner 
31b2b55077SAndrew Turner #ifndef	_MACHINE_SMP_H_
32b2b55077SAndrew Turner #define	_MACHINE_SMP_H_
33b2b55077SAndrew Turner 
34b2b55077SAndrew Turner #include <machine/pcb.h>
35b2b55077SAndrew Turner 
36b2b55077SAndrew Turner enum {
37b2b55077SAndrew Turner 	IPI_AST,
38b2b55077SAndrew Turner 	IPI_PREEMPT,
39b2b55077SAndrew Turner 	IPI_RENDEZVOUS,
40b2b55077SAndrew Turner 	IPI_STOP,
41b2b55077SAndrew Turner 	IPI_STOP_HARD,
42b2b55077SAndrew Turner 	IPI_HARDCLOCK,
43*a9056bbbSAndrew Turner 	INTR_IPI_COUNT,
44b2b55077SAndrew Turner };
45b2b55077SAndrew Turner 
46b2b55077SAndrew Turner void	ipi_all_but_self(u_int ipi);
47b2b55077SAndrew Turner void	ipi_cpu(int cpu, u_int ipi);
48b2b55077SAndrew Turner void	ipi_selected(cpuset_t cpus, u_int ipi);
49b2b55077SAndrew Turner 
50b2b55077SAndrew Turner #endif /* !_MACHINE_SMP_H_ */
51