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