Spell interrupts correctlydiff -r1.21 -r1.22 src/sys/arch/arm/xscale/pxa2x0_intr.c
(skrll)
--- src/sys/arch/arm/xscale/pxa2x0_intr.c 2013/12/17 01:28:04 1.21
+++ src/sys/arch/arm/xscale/pxa2x0_intr.c 2021/01/04 15:13:06 1.22
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: pxa2x0_intr.c,v 1.21 2013/12/17 01:28:04 joerg Exp $ */ | 1 | /* $NetBSD: pxa2x0_intr.c,v 1.22 2021/01/04 15:13:06 skrll Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2002 Genetec Corporation. All rights reserved. | 4 | * Copyright (c) 2002 Genetec Corporation. All rights reserved. | |
5 | * Written by Hiroyuki Bessho for Genetec Corporation. | 5 | * Written by Hiroyuki Bessho for Genetec Corporation. | |
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. | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 29 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 30 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
31 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 31 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 32 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
33 | * POSSIBILITY OF SUCH DAMAGE. | 33 | * POSSIBILITY OF SUCH DAMAGE. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * IRQ handler for the Intel PXA2X0 processor. | 37 | * IRQ handler for the Intel PXA2X0 processor. | |
38 | * It has integrated interrupt controller. | 38 | * It has integrated interrupt controller. | |
39 | */ | 39 | */ | |
40 | 40 | |||
41 | #include <sys/cdefs.h> | 41 | #include <sys/cdefs.h> | |
42 | __KERNEL_RCSID(0, "$NetBSD: pxa2x0_intr.c,v 1.21 2013/12/17 01:28:04 joerg Exp $"); | 42 | __KERNEL_RCSID(0, "$NetBSD: pxa2x0_intr.c,v 1.22 2021/01/04 15:13:06 skrll Exp $"); | |
43 | 43 | |||
44 | #include <sys/param.h> | 44 | #include <sys/param.h> | |
45 | #include <sys/systm.h> | 45 | #include <sys/systm.h> | |
46 | #include <sys/malloc.h> | 46 | #include <sys/malloc.h> | |
47 | 47 | |||
48 | #include <sys/bus.h> | 48 | #include <sys/bus.h> | |
49 | #include <machine/intr.h> | 49 | #include <machine/intr.h> | |
50 | #include <machine/lock.h> | 50 | #include <machine/lock.h> | |
51 | 51 | |||
52 | #include <arm/xscale/pxa2x0cpu.h> | 52 | #include <arm/xscale/pxa2x0cpu.h> | |
53 | #include <arm/xscale/pxa2x0reg.h> | 53 | #include <arm/xscale/pxa2x0reg.h> | |
54 | #include <arm/xscale/pxa2x0var.h> | 54 | #include <arm/xscale/pxa2x0var.h> | |
55 | #include <arm/xscale/pxa2x0_intr.h> | 55 | #include <arm/xscale/pxa2x0_intr.h> | |
@@ -242,27 +242,27 @@ pxa2x0_update_intr_masks(int irqno, int | @@ -242,27 +242,27 @@ pxa2x0_update_intr_masks(int irqno, int | |||
242 | pxa2x0_imask[IPL_HIGH] &= pxa2x0_imask[IPL_SCHED]; | 242 | pxa2x0_imask[IPL_HIGH] &= pxa2x0_imask[IPL_SCHED]; | |
243 | 243 | |||
244 | write_icu(SAIPIC_MR, pxa2x0_imask[curcpu()->ci_cpl]); | 244 | write_icu(SAIPIC_MR, pxa2x0_imask[curcpu()->ci_cpl]); | |
245 | 245 | |||
246 | restore_interrupts(psw); | 246 | restore_interrupts(psw); | |
247 | } | 247 | } | |
248 | 248 | |||
249 | 249 | |||
250 | static void | 250 | static void | |
251 | init_interrupt_masks(void) | 251 | init_interrupt_masks(void) | |
252 | { | 252 | { | |
253 | 253 | |||
254 | /* | 254 | /* | |
255 | * disable all interrups until handlers are installed. | 255 | * disable all interrupts until handlers are installed. | |
256 | */ | 256 | */ | |
257 | memset(pxa2x0_imask, 0, sizeof(pxa2x0_imask)); | 257 | memset(pxa2x0_imask, 0, sizeof(pxa2x0_imask)); | |
258 | 258 | |||
259 | } | 259 | } | |
260 | 260 | |||
261 | #undef splx | 261 | #undef splx | |
262 | void | 262 | void | |
263 | splx(int ipl) | 263 | splx(int ipl) | |
264 | { | 264 | { | |
265 | pxa2x0_splx(ipl); | 265 | pxa2x0_splx(ipl); | |
266 | } | 266 | } | |
267 | 267 | |||
268 | #undef _splraise | 268 | #undef _splraise |
--- src/sys/arch/sparc64/doc/TODO 2019/02/08 19:55:40 1.29
+++ src/sys/arch/sparc64/doc/TODO 2021/01/04 15:13:06 1.30
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: TODO,v 1.29 2019/02/08 19:55:40 palle Exp $ */ | 1 | /* $NetBSD: TODO,v 1.30 2021/01/04 15:13:06 skrll Exp $ */ | |
2 | 2 | |||
3 | Things to be done: | 3 | Things to be done: | |
4 | 4 | |||
5 | common: | 5 | common: | |
6 | - make %g6 point to curcpu | 6 | - make %g6 point to curcpu | |
7 | - make %g7 point to curlwp | 7 | - make %g7 point to curlwp | |
8 | - change run-time checks for cpu type to function pointers | 8 | - change run-time checks for cpu type to function pointers | |
9 | 9 | |||
10 | sun4u: | 10 | sun4u: | |
11 | - GENERIC.UP kernel hangs on v445 (missing interrupt?) | 11 | - GENERIC.UP kernel hangs on v445 (missing interrupt?) | |
12 | 12 | |||
13 | sun4v: | 13 | sun4v: | |
14 | - current status: The kernel boots and starts the init process. | 14 | - current status: The kernel boots and starts the init process. | |
@@ -18,23 +18,23 @@ sun4v: | @@ -18,23 +18,23 @@ sun4v: | |||
18 | - 32-bit kernel support | 18 | - 32-bit kernel support | |
19 | - libkvm | 19 | - libkvm | |
20 | - ofwboot: tlb_init_sun4v() hardcodes number of slots to 64 | 20 | - ofwboot: tlb_init_sun4v() hardcodes number of slots to 64 | |
21 | - locore.s: sun4v_datatrap missing implementation for trap level 1 | 21 | - locore.s: sun4v_datatrap missing implementation for trap level 1 | |
22 | - check build without SUN4V defined | 22 | - check build without SUN4V defined | |
23 | - replace relevant references to %ver with GET_MAXCWP | 23 | - replace relevant references to %ver with GET_MAXCWP | |
24 | - pmap_mp_init(): sun4v missing handling | 24 | - pmap_mp_init(): sun4v missing handling | |
25 | - replace constructs like "wrpr %g0, PSTATE_KERN, %pstate" with NORMAL_GLOBALS | 25 | - replace constructs like "wrpr %g0, PSTATE_KERN, %pstate" with NORMAL_GLOBALS | |
26 | - replace constructs line "wrpr %g0, PSTATE_INTR, %pstate" with ALTERNATE_GOBALS | 26 | - replace constructs line "wrpr %g0, PSTATE_INTR, %pstate" with ALTERNATE_GOBALS | |
27 | - sun4v tsb no need to lock... per cpu... anyway... | 27 | - sun4v tsb no need to lock... per cpu... anyway... | |
28 | - ci_tsb_desc->td_ctxidx: -1 or 1? | 28 | - ci_tsb_desc->td_ctxidx: -1 or 1? | |
29 | - MP support - currently bypassed in pmap_bootstrap() for sun4v | 29 | - MP support - currently bypassed in pmap_bootstrap() for sun4v | |
30 | - vpci.c/vpcivar.h: cleanup FIXMEs | 30 | - vpci.c/vpcivar.h: cleanup FIXMEs | |
31 | - interrups not handled properly (com at ebus only...) | 31 | - interrupts not handled properly (com at ebus only...) | |
32 | - mpt(4) complains: mpt0: Phy 0: Link Status Unknown | 32 | - mpt(4) complains: mpt0: Phy 0: Link Status Unknown | |
33 | - man pages for drivers imported from OpenBSD lke vpci, vbus, cbus, vdsk, ldc etc. | 33 | - man pages for drivers imported from OpenBSD lke vpci, vbus, cbus, vdsk, ldc etc. | |
34 | - vdsk and ldc drivers: code maked with OPENBSD_BUSDMA - make the bus_dma stuff work properly | 34 | - vdsk and ldc drivers: code maked with OPENBSD_BUSDMA - make the bus_dma stuff work properly | |
35 | - vbus.c: handle prom_getprop() memory leaks | 35 | - vbus.c: handle prom_getprop() memory leaks | |
36 | - locore.s: rft_user (sun4v specific manaul fill) - seems to work, but is it good enough (compared to openbsds rft_user? | 36 | - locore.s: rft_user (sun4v specific manaul fill) - seems to work, but is it good enough (compared to openbsds rft_user? | |
37 | - platforms tested so far: | 37 | - platforms tested so far: | |
38 | -- qemu sun4v/niagara - crash in init process relaed to fork (stack?) | 38 | -- qemu sun4v/niagara - crash in init process relaed to fork (stack?) | |
39 | -- T2000 - mmu fault somewhere | 39 | -- T2000 - mmu fault somewhere | |
40 | -- T5 - stickcmpr is not properly initialized ??? | 40 | -- T5 - stickcmpr is not properly initialized ??? |
--- src/sys/dev/ic/wdc.c 2020/06/03 18:25:26 1.303
+++ src/sys/dev/ic/wdc.c 2021/01/04 15:13:06 1.304
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: wdc.c,v 1.303 2020/06/03 18:25:26 bouyer Exp $ */ | 1 | /* $NetBSD: wdc.c,v 1.304 2021/01/04 15:13:06 skrll Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved. | 4 | * Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -48,27 +48,27 @@ | @@ -48,27 +48,27 @@ | |||
48 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 48 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
49 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 49 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
50 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 50 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
51 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 51 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
52 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 52 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
53 | * POSSIBILITY OF SUCH DAMAGE. | 53 | * POSSIBILITY OF SUCH DAMAGE. | |
54 | */ | 54 | */ | |
55 | 55 | |||
56 | /* | 56 | /* | |
57 | * CODE UNTESTED IN THE CURRENT REVISION: | 57 | * CODE UNTESTED IN THE CURRENT REVISION: | |
58 | */ | 58 | */ | |
59 | 59 | |||
60 | #include <sys/cdefs.h> | 60 | #include <sys/cdefs.h> | |
61 | __KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.303 2020/06/03 18:25:26 bouyer Exp $"); | 61 | __KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.304 2021/01/04 15:13:06 skrll Exp $"); | |
62 | 62 | |||
63 | #include "opt_ata.h" | 63 | #include "opt_ata.h" | |
64 | #include "opt_wdc.h" | 64 | #include "opt_wdc.h" | |
65 | 65 | |||
66 | #include <sys/param.h> | 66 | #include <sys/param.h> | |
67 | #include <sys/systm.h> | 67 | #include <sys/systm.h> | |
68 | #include <sys/kernel.h> | 68 | #include <sys/kernel.h> | |
69 | #include <sys/conf.h> | 69 | #include <sys/conf.h> | |
70 | #include <sys/buf.h> | 70 | #include <sys/buf.h> | |
71 | #include <sys/device.h> | 71 | #include <sys/device.h> | |
72 | #include <sys/malloc.h> | 72 | #include <sys/malloc.h> | |
73 | #include <sys/kmem.h> | 73 | #include <sys/kmem.h> | |
74 | #include <sys/syslog.h> | 74 | #include <sys/syslog.h> | |
@@ -333,27 +333,27 @@ wdc_drvprobe(struct ata_channel *chp) | @@ -333,27 +333,27 @@ wdc_drvprobe(struct ata_channel *chp) | |||
333 | delay(10); /* 400ns delay */ | 333 | delay(10); /* 400ns delay */ | |
334 | st0 = bus_space_read_1(wdr->cmd_iot, | 334 | st0 = bus_space_read_1(wdr->cmd_iot, | |
335 | wdr->cmd_iohs[wd_status], 0); | 335 | wdr->cmd_iohs[wd_status], 0); | |
336 | } | 336 | } | |
337 | 337 | |||
338 | 338 | |||
339 | if ((chp->ch_drive[0].drive_type != ATA_DRIVET_ATA || | 339 | if ((chp->ch_drive[0].drive_type != ATA_DRIVET_ATA || | |
340 | (st0 & WDCS_DRDY)) && | 340 | (st0 & WDCS_DRDY)) && | |
341 | (chp->ch_ndrives < 2 || | 341 | (chp->ch_ndrives < 2 || | |
342 | chp->ch_drive[1].drive_type != ATA_DRIVET_ATA || | 342 | chp->ch_drive[1].drive_type != ATA_DRIVET_ATA || | |
343 | (st1 & WDCS_DRDY))) | 343 | (st1 & WDCS_DRDY))) | |
344 | break; | 344 | break; | |
345 | #ifdef WDC_NO_IDS | 345 | #ifdef WDC_NO_IDS | |
346 | /* cannot kpause here (can't enable IPL_BIO interrups), | 346 | /* cannot kpause here (can't enable IPL_BIO interrupts), | |
347 | * delay instead | 347 | * delay instead | |
348 | */ | 348 | */ | |
349 | delay(1000000 / hz); | 349 | delay(1000000 / hz); | |
350 | #else | 350 | #else | |
351 | ata_delay(chp, 1, "atadrdy", AT_WAIT); | 351 | ata_delay(chp, 1, "atadrdy", AT_WAIT); | |
352 | #endif | 352 | #endif | |
353 | } | 353 | } | |
354 | if ((st0 & WDCS_DRDY) == 0 && | 354 | if ((st0 & WDCS_DRDY) == 0 && | |
355 | chp->ch_drive[0].drive_type != ATA_DRIVET_ATAPI) | 355 | chp->ch_drive[0].drive_type != ATA_DRIVET_ATAPI) | |
356 | chp->ch_drive[0].drive_type = ATA_DRIVET_NONE; | 356 | chp->ch_drive[0].drive_type = ATA_DRIVET_NONE; | |
357 | if (chp->ch_ndrives > 1 && (st1 & WDCS_DRDY) == 0 && | 357 | if (chp->ch_ndrives > 1 && (st1 & WDCS_DRDY) == 0 && | |
358 | chp->ch_drive[1].drive_type != ATA_DRIVET_ATAPI) | 358 | chp->ch_drive[1].drive_type != ATA_DRIVET_ATAPI) | |
359 | chp->ch_drive[1].drive_type = ATA_DRIVET_NONE; | 359 | chp->ch_drive[1].drive_type = ATA_DRIVET_NONE; |