| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ipifuncs.c,v 1.42 2010/06/22 18:29:01 rmind Exp $ */ | | 1 | /* $NetBSD: ipifuncs.c,v 1.43 2010/06/23 13:52:26 rmind Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, | | 8 | * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, |
9 | * NASA Ames Research Center. | | 9 | * NASA Ames Research Center. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -22,40 +22,41 @@ | | | @@ -22,40 +22,41 @@ |
22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 22 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 23 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 24 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 25 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 26 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 27 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 28 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 29 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
30 | * POSSIBILITY OF SUCH DAMAGE. | | 30 | * POSSIBILITY OF SUCH DAMAGE. |
31 | */ | | 31 | */ |
32 | | | 32 | |
33 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | | 33 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ |
34 | | | 34 | |
35 | __KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.42 2010/06/22 18:29:01 rmind Exp $"); | | 35 | __KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.43 2010/06/23 13:52:26 rmind Exp $"); |
36 | | | 36 | |
37 | /* | | 37 | /* |
38 | * Interprocessor interrupt handlers. | | 38 | * Interprocessor interrupt handlers. |
39 | */ | | 39 | */ |
40 | | | 40 | |
41 | #include <sys/param.h> | | 41 | #include <sys/param.h> |
42 | #include <sys/device.h> | | 42 | #include <sys/device.h> |
43 | #include <sys/proc.h> | | 43 | #include <sys/proc.h> |
44 | #include <sys/systm.h> | | 44 | #include <sys/systm.h> |
45 | #include <sys/reboot.h> | | 45 | #include <sys/reboot.h> |
46 | #include <sys/atomic.h> | | 46 | #include <sys/atomic.h> |
47 | #include <sys/cpu.h> | | 47 | #include <sys/cpu.h> |
48 | #include <sys/intr.h> | | 48 | #include <sys/intr.h> |
| | | 49 | #include <sys/xcall.h> |
49 | | | 50 | |
50 | #include <uvm/uvm_extern.h> | | 51 | #include <uvm/uvm_extern.h> |
51 | | | 52 | |
52 | #include <machine/alpha_cpu.h> | | 53 | #include <machine/alpha_cpu.h> |
53 | #include <machine/alpha.h> | | 54 | #include <machine/alpha.h> |
54 | #include <machine/cpuvar.h> | | 55 | #include <machine/cpuvar.h> |
55 | #include <machine/rpb.h> | | 56 | #include <machine/rpb.h> |
56 | #include <machine/prom.h> | | 57 | #include <machine/prom.h> |
57 | | | 58 | |
58 | typedef void (*ipifunc_t)(struct cpu_info *, struct trapframe *); | | 59 | typedef void (*ipifunc_t)(struct cpu_info *, struct trapframe *); |
59 | | | 60 | |
60 | void alpha_ipi_halt(struct cpu_info *, struct trapframe *); | | 61 | void alpha_ipi_halt(struct cpu_info *, struct trapframe *); |
61 | void alpha_ipi_microset(struct cpu_info *, struct trapframe *); | | 62 | void alpha_ipi_microset(struct cpu_info *, struct trapframe *); |
| @@ -307,27 +308,27 @@ alpha_ipi_pause(struct cpu_info *ci, str | | | @@ -307,27 +308,27 @@ alpha_ipi_pause(struct cpu_info *ci, str |
307 | | | 308 | |
308 | ci->ci_db_regs = NULL; | | 309 | ci->ci_db_regs = NULL; |
309 | | | 310 | |
310 | splx(s); | | 311 | splx(s); |
311 | | | 312 | |
312 | /* Do an IMB on the way out, in case the kernel text was changed. */ | | 313 | /* Do an IMB on the way out, in case the kernel text was changed. */ |
313 | alpha_pal_imb(); | | 314 | alpha_pal_imb(); |
314 | } | | 315 | } |
315 | | | 316 | |
316 | /* | | 317 | /* |
317 | * MD support for xcall(9) interface. | | 318 | * MD support for xcall(9) interface. |
318 | */ | | 319 | */ |
319 | | | 320 | |
320 | static void | | 321 | void |
321 | alpha_ipi_xcall(struct cpu_info *ci, struct trapframe *framep) | | 322 | alpha_ipi_xcall(struct cpu_info *ci, struct trapframe *framep) |
322 | { | | 323 | { |
323 | | | 324 | |
324 | xc_ipi_handler(); | | 325 | xc_ipi_handler(); |
325 | } | | 326 | } |
326 | | | 327 | |
327 | void | | 328 | void |
328 | xc_send_ipi(struct cpu_info *ci) | | 329 | xc_send_ipi(struct cpu_info *ci) |
329 | { | | 330 | { |
330 | | | 331 | |
331 | KASSERT(kpreempt_disabled()); | | 332 | KASSERT(kpreempt_disabled()); |
332 | KASSERT(curcpu() != ci); | | 333 | KASSERT(curcpu() != ci); |
333 | | | 334 | |