1367SN/A/*-
2462SN/A * Copyright (c) 2008 Marcel Moolenaar
3367SN/A * All rights reserved.
4367SN/A *
5367SN/A * Redistribution and use in source and binary forms, with or without
6367SN/A * modification, are permitted provided that the following conditions
7367SN/A * are met:
8367SN/A *
9367SN/A * 1. Redistributions of source code must retain the above copyright
10367SN/A *    notice, this list of conditions and the following disclaimer.
11367SN/A * 2. Redistributions in binary form must reproduce the above copyright
12367SN/A *    notice, this list of conditions and the following disclaimer in the
13367SN/A *    documentation and/or other materials provided with the distribution.
14367SN/A *
15367SN/A * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16367SN/A * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17367SN/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18367SN/A * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19367SN/A * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20367SN/A * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21367SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22367SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23367SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24367SN/A * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25367SN/A *
26367SN/A * $FreeBSD: releng/10.2/sys/powerpc/include/smp.h 222813 2011-06-07 08:46:13Z attilio $
27367SN/A */
28367SN/A
29367SN/A#ifndef _MACHINE_SMP_H_
30367SN/A#define _MACHINE_SMP_H_
31367SN/A
32367SN/A#ifdef _KERNEL
33367SN/A
34367SN/A#define	IPI_AST			0
35367SN/A#define	IPI_PREEMPT		1
36367SN/A#define	IPI_RENDEZVOUS		2
37367SN/A#define	IPI_STOP		3
38367SN/A#define	IPI_STOP_HARD		3
39367SN/A#define	IPI_HARDCLOCK		4
40367SN/A
41367SN/A#ifndef LOCORE
42367SN/A
43367SN/A#include <sys/_cpuset.h>
44367SN/A
45367SN/Avoid	ipi_all_but_self(int ipi);
46367SN/Avoid	ipi_cpu(int cpu, u_int ipi);
47367SN/Avoid	ipi_selected(cpuset_t cpus, int ipi);
48367SN/A
49367SN/Astruct cpuref {
50367SN/A	uintptr_t	cr_hwref;
51367SN/A	u_int		cr_cpuid;
52367SN/A};
53367SN/A
54367SN/Avoid	pmap_cpu_bootstrap(int);
55367SN/Avoid	cpudep_ap_early_bootstrap(void);
56367SN/Auintptr_t cpudep_ap_bootstrap(void);
57367SN/Avoid	cpudep_ap_setup(void);
58367SN/Avoid	machdep_ap_bootstrap(void);
59367SN/A
60367SN/A#endif /* !LOCORE */
61367SN/A#endif /* _KERNEL */
62367SN/A#endif /* !_MACHINE_SMP_H */
63367SN/A