smp.h revision 196196
154803Srwatson/*-
2160146Srwatson * Copyright (c) 2008 Marcel Moolenaar
354803Srwatson * All rights reserved.
454803Srwatson *
585845Srwatson * Redistribution and use in source and binary forms, with or without
685845Srwatson * modification, are permitted provided that the following conditions
754803Srwatson * are met:
854803Srwatson *
954803Srwatson * 1. Redistributions of source code must retain the above copyright
1054803Srwatson *    notice, this list of conditions and the following disclaimer.
1154803Srwatson * 2. Redistributions in binary form must reproduce the above copyright
1254803Srwatson *    notice, this list of conditions and the following disclaimer in the
1354803Srwatson *    documentation and/or other materials provided with the distribution.
1454803Srwatson *
1554803Srwatson * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1654803Srwatson * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1754803Srwatson * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1854803Srwatson * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1954803Srwatson * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2054803Srwatson * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2154803Srwatson * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2254803Srwatson * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2354803Srwatson * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2454803Srwatson * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2554803Srwatson *
2654803Srwatson * $FreeBSD: head/sys/powerpc/include/smp.h 196196 2009-08-13 17:09:45Z attilio $
2754803Srwatson */
2854803Srwatson
2973890Srwatson#ifndef _MACHINE_SMP_H_
30160146Srwatson#define _MACHINE_SMP_H_
31160146Srwatson
32160146Srwatson#ifdef _KERNEL
33160146Srwatson
3454803Srwatson#define	IPI_AST			0
3554803Srwatson#define	IPI_PREEMPT		1
36116182Sobrien#define	IPI_RENDEZVOUS		2
37116182Sobrien#define	IPI_STOP		3
38116182Sobrien#define	IPI_STOP_HARD		3
3954803Srwatson
4054803Srwatson#ifndef LOCORE
41150262Scsjp
42164033Srwatsonvoid	ipi_all_but_self(int ipi);
4354803Srwatsonvoid	ipi_selected(cpumask_t cpus, int ipi);
4454803Srwatson
4554803Srwatsonstruct cpuref {
4654803Srwatson	uintptr_t	cr_hwref;
4754803Srwatson	u_int		cr_cpuid;
4854803Srwatson};
49160597Srwatson
50164033Srwatsonvoid	pmap_cpu_bootstrap(int);
51164033Srwatsonuint32_t cpudep_ap_bootstrap(void);
52164033Srwatsonvoid	machdep_ap_bootstrap(void);
5373890Srwatson
5473890Srwatson#endif /* !LOCORE */
5575571Srwatson#endif /* _KERNEL */
56184427Strasz#endif /* !_MACHINE_SMP_H */
5773890Srwatson