1178622Smarcel/*-
2178622Smarcel * Copyright (c) 2008 Marcel Moolenaar
3178622Smarcel * All rights reserved.
4178622Smarcel *
5178622Smarcel * Redistribution and use in source and binary forms, with or without
6178622Smarcel * modification, are permitted provided that the following conditions
7178622Smarcel * are met:
8178622Smarcel *
9178622Smarcel * 1. Redistributions of source code must retain the above copyright
10178622Smarcel *    notice, this list of conditions and the following disclaimer.
11178622Smarcel * 2. Redistributions in binary form must reproduce the above copyright
12178622Smarcel *    notice, this list of conditions and the following disclaimer in the
13178622Smarcel *    documentation and/or other materials provided with the distribution.
14178622Smarcel *
15178622Smarcel * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16178622Smarcel * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17178622Smarcel * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18178622Smarcel * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19178622Smarcel * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20178622Smarcel * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21178622Smarcel * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22178622Smarcel * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23178622Smarcel * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24178622Smarcel * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25178622Smarcel *
26178622Smarcel * $FreeBSD: releng/10.3/sys/powerpc/include/smp.h 222813 2011-06-07 08:46:13Z attilio $
27178622Smarcel */
2878342Sbenno
29178622Smarcel#ifndef _MACHINE_SMP_H_
30178622Smarcel#define _MACHINE_SMP_H_
31178622Smarcel
32178622Smarcel#ifdef _KERNEL
33178622Smarcel
34178622Smarcel#define	IPI_AST			0
35178622Smarcel#define	IPI_PREEMPT		1
36178622Smarcel#define	IPI_RENDEZVOUS		2
37178622Smarcel#define	IPI_STOP		3
38196196Sattilio#define	IPI_STOP_HARD		3
39212453Smav#define	IPI_HARDCLOCK		4
40178622Smarcel
41178622Smarcel#ifndef LOCORE
42178622Smarcel
43222813Sattilio#include <sys/_cpuset.h>
44222813Sattilio
45178622Smarcelvoid	ipi_all_but_self(int ipi);
46210939Sjhbvoid	ipi_cpu(int cpu, u_int ipi);
47222813Sattiliovoid	ipi_selected(cpuset_t cpus, int ipi);
48178622Smarcel
49178622Smarcelstruct cpuref {
50178622Smarcel	uintptr_t	cr_hwref;
51178622Smarcel	u_int		cr_cpuid;
52178622Smarcel};
53178622Smarcel
54183060Smarcelvoid	pmap_cpu_bootstrap(int);
55209975Snwhitehornvoid	cpudep_ap_early_bootstrap(void);
56198378Snwhitehornuintptr_t cpudep_ap_bootstrap(void);
57198378Snwhitehornvoid	cpudep_ap_setup(void);
58183060Smarcelvoid	machdep_ap_bootstrap(void);
59178622Smarcel
60178622Smarcel#endif /* !LOCORE */
61178622Smarcel#endif /* _KERNEL */
62178622Smarcel#endif /* !_MACHINE_SMP_H */
63