smp.h revision 210939
166458Sdfr/*-
266458Sdfr * Copyright (c) 2008 Marcel Moolenaar
366458Sdfr * All rights reserved.
466458Sdfr *
566458Sdfr * Redistribution and use in source and binary forms, with or without
666458Sdfr * modification, are permitted provided that the following conditions
766458Sdfr * are met:
866458Sdfr *
966458Sdfr * 1. Redistributions of source code must retain the above copyright
1066458Sdfr *    notice, this list of conditions and the following disclaimer.
1166458Sdfr * 2. Redistributions in binary form must reproduce the above copyright
1266458Sdfr *    notice, this list of conditions and the following disclaimer in the
1366458Sdfr *    documentation and/or other materials provided with the distribution.
1466458Sdfr *
1566458Sdfr * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
1666458Sdfr * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
1766458Sdfr * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
1866458Sdfr * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
1966458Sdfr * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2066458Sdfr * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2166458Sdfr * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2266458Sdfr * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2366458Sdfr * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2466458Sdfr * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2566458Sdfr *
2666458Sdfr * $FreeBSD: head/sys/powerpc/include/smp.h 210939 2010-08-06 15:36:59Z jhb $
2766458Sdfr */
2866458Sdfr
2966458Sdfr#ifndef _MACHINE_SMP_H_
3066458Sdfr#define _MACHINE_SMP_H_
3166458Sdfr
3266458Sdfr#ifdef _KERNEL
3366458Sdfr
3466458Sdfr#define	IPI_AST			0
3566458Sdfr#define	IPI_PREEMPT		1
3666458Sdfr#define	IPI_RENDEZVOUS		2
3766458Sdfr#define	IPI_STOP		3
3866458Sdfr#define	IPI_STOP_HARD		3
3966458Sdfr
4066458Sdfr#ifndef LOCORE
4166458Sdfr
4266458Sdfrvoid	ipi_all_but_self(int ipi);
4366458Sdfrvoid	ipi_cpu(int cpu, u_int ipi);
4466458Sdfrvoid	ipi_selected(cpumask_t cpus, int ipi);
4566458Sdfr
4666458Sdfrstruct cpuref {
4766458Sdfr	uintptr_t	cr_hwref;
4866458Sdfr	u_int		cr_cpuid;
4966458Sdfr};
5066458Sdfr
5166458Sdfrvoid	pmap_cpu_bootstrap(int);
5266458Sdfrvoid	cpudep_ap_early_bootstrap(void);
5366458Sdfruintptr_t cpudep_ap_bootstrap(void);
5466458Sdfrvoid	cpudep_ap_setup(void);
5566458Sdfrvoid	machdep_ap_bootstrap(void);
5666458Sdfr
5766458Sdfr#endif /* !LOCORE */
5866458Sdfr#endif /* _KERNEL */
5966458Sdfr#endif /* !_MACHINE_SMP_H */
6079008Simp