| @@ -1,23 +1,23 @@ | | | @@ -1,23 +1,23 @@ |
1 | #include "opt_gemini.h" | | 1 | #include "opt_gemini.h" |
2 | #if !defined(GEMINI_MASTER) && !defined(GEMINI_SLAVE) | | 2 | #if !defined(GEMINI_MASTER) && !defined(GEMINI_SLAVE) |
3 | # error IPI needs GEMINI_MASTER or GEMINI_SLAVE | | 3 | # error IPI needs GEMINI_MASTER or GEMINI_SLAVE |
4 | #endif | | 4 | #endif |
5 | #include "locators.h" | | 5 | #include "locators.h" |
6 | #include "geminiipm.h" | | 6 | #include "geminiipm.h" |
7 | | | 7 | |
8 | #include <sys/cdefs.h> | | 8 | #include <sys/cdefs.h> |
9 | | | 9 | |
10 | __KERNEL_RCSID(0, "$NetBSD: gemini_ipi.c,v 1.6 2012/10/27 17:17:38 chs Exp $"); | | 10 | __KERNEL_RCSID(0, "$NetBSD: gemini_ipi.c,v 1.7 2019/08/30 00:33:55 riastradh Exp $"); |
11 | | | 11 | |
12 | #include <sys/param.h> | | 12 | #include <sys/param.h> |
13 | #include <sys/systm.h> | | 13 | #include <sys/systm.h> |
14 | #include <sys/device.h> | | 14 | #include <sys/device.h> |
15 | #include <sys/intr.h> | | 15 | #include <sys/intr.h> |
16 | #include <sys/malloc.h> | | 16 | #include <sys/malloc.h> |
17 | #include <arch/arm/gemini/gemini_obiovar.h> | | 17 | #include <arch/arm/gemini/gemini_obiovar.h> |
18 | #include <arch/arm/gemini/gemini_ipivar.h> | | 18 | #include <arch/arm/gemini/gemini_ipivar.h> |
19 | #include <arch/arm/gemini/gemini_reg.h> | | 19 | #include <arch/arm/gemini/gemini_reg.h> |
20 | | | 20 | |
21 | static int gemini_ipi_match(device_t, cfdata_t, void *); | | 21 | static int gemini_ipi_match(device_t, cfdata_t, void *); |
22 | static void gemini_ipi_attach(device_t, device_t, void *); | | 22 | static void gemini_ipi_attach(device_t, device_t, void *); |
23 | static int gemini_ipiintr(void *); | | 23 | static int gemini_ipiintr(void *); |
| @@ -159,27 +159,27 @@ ipi_intr_establish(int (*func)(void *), | | | @@ -159,27 +159,27 @@ ipi_intr_establish(int (*func)(void *), |
159 | panic("%s: gemini_ipi_intrq_insert failed", | | 159 | panic("%s: gemini_ipi_intrq_insert failed", |
160 | device_xname(sc->sc_dev)); | | 160 | device_xname(sc->sc_dev)); |
161 | #endif | | 161 | #endif |
162 | | | 162 | |
163 | return ih; | | 163 | return ih; |
164 | } | | 164 | } |
165 | | | 165 | |
166 | void | | 166 | void |
167 | ipi_intr_disestablish(void *ih) | | 167 | ipi_intr_disestablish(void *ih) |
168 | { | | 168 | { |
169 | gemini_ipi_softc_t *sc = gemini_ipi_sc; | | 169 | gemini_ipi_softc_t *sc = gemini_ipi_sc; |
170 | | | 170 | |
171 | if (sc == NULL) | | 171 | if (sc == NULL) |
172 | panic("%s: NULL gemini_ipi_sc", device_xname(sc->sc_dev)); | | 172 | panic("NULL gemini_ipi_sc"); |
173 | | | 173 | |
174 | gemini_ipi_intrq_remove(sc, ih); | | 174 | gemini_ipi_intrq_remove(sc, ih); |
175 | } | | 175 | } |
176 | | | 176 | |
177 | int | | 177 | int |
178 | ipi_send(void) | | 178 | ipi_send(void) |
179 | { | | 179 | { |
180 | gemini_ipi_softc_t *sc = gemini_ipi_sc; | | 180 | gemini_ipi_softc_t *sc = gemini_ipi_sc; |
181 | uint32_t r; | | 181 | uint32_t r; |
182 | uint32_t bit; | | 182 | uint32_t bit; |
183 | bus_addr_t off; | | 183 | bus_addr_t off; |
184 | | | 184 | |
185 | if (sc == NULL) | | 185 | if (sc == NULL) |