| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pic_openpic.c,v 1.16 2020/07/06 09:34:18 rin Exp $ */ | | 1 | /* $NetBSD: pic_openpic.c,v 1.17 2020/07/06 10:54:56 rin Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2007 Michael Lorenz | | 4 | * Copyright (c) 2007 Michael Lorenz |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -17,32 +17,36 @@ | | | @@ -17,32 +17,36 @@ |
17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 17 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 18 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 19 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 20 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 21 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 22 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 23 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 24 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 25 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
26 | * POSSIBILITY OF SUCH DAMAGE. | | 26 | * POSSIBILITY OF SUCH DAMAGE. |
27 | */ | | 27 | */ |
28 | | | 28 | |
29 | #include <sys/cdefs.h> | | 29 | #include <sys/cdefs.h> |
30 | __KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.16 2020/07/06 09:34:18 rin Exp $"); | | 30 | __KERNEL_RCSID(0, "$NetBSD: pic_openpic.c,v 1.17 2020/07/06 10:54:56 rin Exp $"); |
31 | | | 31 | |
32 | #ifdef _KERNEL_OPT | | 32 | #ifdef _KERNEL_OPT |
33 | #include "opt_interrupt.h" | | 33 | #include "opt_interrupt.h" |
34 | #endif | | 34 | #endif |
35 | | | 35 | |
| | | 36 | #ifdef _KERNEL_OPT |
| | | 37 | #include "opt_multiprocessor.h" |
| | | 38 | #endif |
| | | 39 | |
36 | #include <sys/param.h> | | 40 | #include <sys/param.h> |
37 | #include <sys/kmem.h> | | 41 | #include <sys/kmem.h> |
38 | #include <sys/kernel.h> | | 42 | #include <sys/kernel.h> |
39 | | | 43 | |
40 | #include <uvm/uvm_extern.h> | | 44 | #include <uvm/uvm_extern.h> |
41 | | | 45 | |
42 | #include <machine/pio.h> | | 46 | #include <machine/pio.h> |
43 | #include <powerpc/openpic.h> | | 47 | #include <powerpc/openpic.h> |
44 | | | 48 | |
45 | #include <powerpc/pic/picvar.h> | | 49 | #include <powerpc/pic/picvar.h> |
46 | | | 50 | |
47 | static void opic_enable_irq(struct pic_ops *, int, int); | | 51 | static void opic_enable_irq(struct pic_ops *, int, int); |
48 | static void opic_disable_irq(struct pic_ops *, int); | | 52 | static void opic_disable_irq(struct pic_ops *, int); |