convert all mips cpu_intr() to have the standard (uint32_t, uint32_t, vaddr_t, uint32_t) signature.diff -r1.12 -r1.13 src/sys/arch/evbmips/evbmips/interrupt.c
(mrg)
--- src/sys/arch/evbmips/evbmips/interrupt.c 2009/12/14 00:46:02 1.12
+++ src/sys/arch/evbmips/evbmips/interrupt.c 2009/12/15 06:01:43 1.13
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: interrupt.c,v 1.12 2009/12/14 00:46:02 matt Exp $ */ | 1 | /* $NetBSD: interrupt.c,v 1.13 2009/12/15 06:01:43 mrg Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2001 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 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. | 8 | * by Jason R. Thorpe. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,47 +20,47 @@ | @@ -20,47 +20,47 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.12 2009/12/14 00:46:02 matt Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.13 2009/12/15 06:01:43 mrg Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/device.h> | 36 | #include <sys/device.h> | |
37 | #include <sys/cpu.h> | 37 | #include <sys/cpu.h> | |
38 | #include <sys/intr.h> | 38 | #include <sys/intr.h> | |
39 | 39 | |||
40 | #include <uvm/uvm_extern.h> | 40 | #include <uvm/uvm_extern.h> | |
41 | 41 | |||
42 | #include <mips/mips3_clock.h> | 42 | #include <mips/mips3_clock.h> | |
43 | #include <machine/locore.h> | 43 | #include <machine/locore.h> | |
44 | 44 | |||
45 | void | 45 | void | |
46 | intr_init(void) | 46 | intr_init(void) | |
47 | { | 47 | { | |
48 | 48 | |||
49 | evbmips_intr_init(); /* board specific stuff */ | 49 | evbmips_intr_init(); /* board specific stuff */ | |
50 | } | 50 | } | |
51 | 51 | |||
52 | void | 52 | void | |
53 | cpu_intr(u_int32_t status, u_int32_t cause, vaddr_t pc, u_int32_t ipending) | 53 | cpu_intr(uint32_t status, uint32_t cause, vaddr_t pc, uint32_t ipending) | |
54 | { | 54 | { | |
55 | struct clockframe cf; | 55 | struct clockframe cf; | |
56 | struct cpu_info *ci; | 56 | struct cpu_info *ci; | |
57 | 57 | |||
58 | ci = curcpu(); | 58 | ci = curcpu(); | |
59 | ci->ci_idepth++; | 59 | ci->ci_idepth++; | |
60 | uvmexp.intrs++; | 60 | uvmexp.intrs++; | |
61 | 61 | |||
62 | if (ipending & MIPS_INT_MASK_5) { | 62 | if (ipending & MIPS_INT_MASK_5) { | |
63 | /* call the common MIPS3 clock interrupt handler */ | 63 | /* call the common MIPS3 clock interrupt handler */ | |
64 | cf.pc = pc; | 64 | cf.pc = pc; | |
65 | cf.sr = status; | 65 | cf.sr = status; | |
66 | mips3_clockintr(&cf); | 66 | mips3_clockintr(&cf); |
--- src/sys/arch/hpcmips/hpcmips/interrupt.c 2009/12/14 00:46:04 1.15
+++ src/sys/arch/hpcmips/hpcmips/interrupt.c 2009/12/15 06:01:43 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: interrupt.c,v 1.15 2009/12/14 00:46:04 matt Exp $ */ | 1 | /* $NetBSD: interrupt.c,v 1.16 2009/12/15 06:01:43 mrg Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2001 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 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. | 8 | * by Jason R. Thorpe. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.15 2009/12/14 00:46:04 matt Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.16 2009/12/15 06:01:43 mrg Exp $"); | |
34 | 34 | |||
35 | #include "opt_vr41xx.h" | 35 | #include "opt_vr41xx.h" | |
36 | #include "opt_tx39xx.h" | 36 | #include "opt_tx39xx.h" | |
37 | 37 | |||
38 | #include <sys/param.h> | 38 | #include <sys/param.h> | |
39 | #include <sys/malloc.h> | 39 | #include <sys/malloc.h> | |
40 | 40 | |||
41 | #include <uvm/uvm_extern.h> | 41 | #include <uvm/uvm_extern.h> | |
42 | 42 | |||
43 | #include <machine/sysconf.h> | 43 | #include <machine/sysconf.h> | |
44 | 44 | |||
45 | extern const u_int32_t __ipl_sr_bits_vr[]; | 45 | extern const u_int32_t __ipl_sr_bits_vr[]; | |
46 | extern const u_int32_t __ipl_sr_bits_tx[]; | 46 | extern const u_int32_t __ipl_sr_bits_tx[]; | |
@@ -54,19 +54,19 @@ intr_init(void) | @@ -54,19 +54,19 @@ intr_init(void) | |||
54 | ipl_sr_bits = CPUISMIPS3 ? __ipl_sr_bits_vr : __ipl_sr_bits_tx; | 54 | ipl_sr_bits = CPUISMIPS3 ? __ipl_sr_bits_vr : __ipl_sr_bits_tx; | |
55 | } | 55 | } | |
56 | 56 | |||
57 | #if defined(VR41XX) && defined(TX39XX) | 57 | #if defined(VR41XX) && defined(TX39XX) | |
58 | /* | 58 | /* | |
59 | * cpu_intr: | 59 | * cpu_intr: | |
60 | * | 60 | * | |
61 | * handle MIPS CPU interrupt. | 61 | * handle MIPS CPU interrupt. | |
62 | * if VR41XX only or TX39XX only kernel, directly jump to each handler | 62 | * if VR41XX only or TX39XX only kernel, directly jump to each handler | |
63 | * (tx/tx39icu.c, vr/vr.c), don't use this dispather. | 63 | * (tx/tx39icu.c, vr/vr.c), don't use this dispather. | |
64 | * | 64 | * | |
65 | */ | 65 | */ | |
66 | void | 66 | void | |
67 | cpu_intr(u_int32_t status, u_int32_t cause, vaddr_t pc, u_int32_t ipending) | 67 | cpu_intr(uint32_t status, uint32_t cause, vaddr_t pc, uint32_t ipending) | |
68 | { | 68 | { | |
69 | 69 | |||
70 | (*platform.cpu_intr)(status, cause, pc, ipending); | 70 | (*platform.cpu_intr)(status, cause, pc, ipending); | |
71 | } | 71 | } | |
72 | #endif /* VR41XX && TX39XX */ | 72 | #endif /* VR41XX && TX39XX */ |
--- src/sys/arch/hpcmips/include/sysconf.h 2009/12/14 00:46:04 1.14
+++ src/sys/arch/hpcmips/include/sysconf.h 2009/12/15 06:01:43 1.15
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sysconf.h,v 1.14 2009/12/14 00:46:04 matt Exp $ */ | 1 | /* $NetBSD: sysconf.h,v 1.15 2009/12/15 06:01:43 mrg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. | 4 | * Copyright (c) 1996 Christopher G. Demetriou. 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 | * 3. All advertising materials mentioning features or use of this software | 14 | * 3. All advertising materials mentioning features or use of this software | |
@@ -52,27 +52,27 @@ | @@ -52,27 +52,27 @@ | |||
52 | struct platform_clock; | 52 | struct platform_clock; | |
53 | struct clock_ymdhms; | 53 | struct clock_ymdhms; | |
54 | 54 | |||
55 | extern struct platform { | 55 | extern struct platform { | |
56 | /* | 56 | /* | |
57 | * cpu_intr - interrupt handler | 57 | * cpu_intr - interrupt handler | |
58 | * cpu_idle - CPU dependend idle routine. | 58 | * cpu_idle - CPU dependend idle routine. | |
59 | * cons_init - console initialization | 59 | * cons_init - console initialization | |
60 | * fb_init - frame buffer initialization | 60 | * fb_init - frame buffer initialization | |
61 | * mem_init - Count available memory | 61 | * mem_init - Count available memory | |
62 | * reboot - reboot or powerdown | 62 | * reboot - reboot or powerdown | |
63 | * clock - | 63 | * clock - | |
64 | */ | 64 | */ | |
65 | void (*cpu_intr)(u_int32_t, u_int32_t, vaddr_t, u_int32_t); | 65 | void (*cpu_intr)(uint32_t, uint32_t, vaddr_t, uint32_t); | |
66 | void (*cpu_idle)(void); | 66 | void (*cpu_idle)(void); | |
67 | void (*cons_init)(void); | 67 | void (*cons_init)(void); | |
68 | void (*fb_init)(void **); | 68 | void (*fb_init)(void **); | |
69 | void (*mem_init)(paddr_t); | 69 | void (*mem_init)(paddr_t); | |
70 | void (*reboot)(int, char *); | 70 | void (*reboot)(int, char *); | |
71 | struct platform_clock *clock; | 71 | struct platform_clock *clock; | |
72 | } platform; | 72 | } platform; | |
73 | 73 | |||
74 | struct platform_clock { | 74 | struct platform_clock { | |
75 | int hz; | 75 | int hz; | |
76 | void (*init)(struct device *); | 76 | void (*init)(struct device *); | |
77 | void *self; | 77 | void *self; | |
78 | int start; | 78 | int start; |
--- src/sys/arch/mipsco/mipsco/interrupt.c 2009/12/14 00:46:09 1.8
+++ src/sys/arch/mipsco/mipsco/interrupt.c 2009/12/15 06:01:43 1.9
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: interrupt.c,v 1.8 2009/12/14 00:46:09 matt Exp $ */ | 1 | /* $NetBSD: interrupt.c,v 1.9 2009/12/15 06:01:43 mrg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2001 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 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 Wayne Knowles | 8 | * by Wayne Knowles | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,39 +20,39 @@ | @@ -20,39 +20,39 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.8 2009/12/14 00:46:09 matt Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.9 2009/12/15 06:01:43 mrg Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/malloc.h> | 36 | #include <sys/malloc.h> | |
37 | #include <sys/intr.h> | 37 | #include <sys/intr.h> | |
38 | #include <sys/cpu.h> | 38 | #include <sys/cpu.h> | |
39 | 39 | |||
40 | #include <uvm/uvm_extern.h> | 40 | #include <uvm/uvm_extern.h> | |
41 | 41 | |||
42 | #include <machine/sysconf.h> | 42 | #include <machine/sysconf.h> | |
43 | 43 | |||
44 | void | 44 | void | |
45 | cpu_intr(u_int32_t status, u_int32_t cause, vaddr_t pc, u_int32_t ipending) | 45 | cpu_intr(uint32_t status, uint32_t cause, vaddr_t pc, uint32_t ipending) | |
46 | { | 46 | { | |
47 | struct cpu_info *ci; | 47 | struct cpu_info *ci; | |
48 | 48 | |||
49 | ci = curcpu(); | 49 | ci = curcpu(); | |
50 | uvmexp.intrs++; | 50 | uvmexp.intrs++; | |
51 | 51 | |||
52 | /* device interrupts */ | 52 | /* device interrupts */ | |
53 | ci->ci_idepth++; | 53 | ci->ci_idepth++; | |
54 | (*platform.iointr)(status, cause, pc, ipending); | 54 | (*platform.iointr)(status, cause, pc, ipending); | |
55 | ci->ci_idepth--; | 55 | ci->ci_idepth--; | |
56 | 56 | |||
57 | #ifdef __HAVE_FAST_SOFTINTS | 57 | #ifdef __HAVE_FAST_SOFTINTS | |
58 | /* software simulated interrupt */ | 58 | /* software simulated interrupt */ |
--- src/sys/arch/sgimips/sgimips/cpu.c 2009/12/14 00:46:13 1.22
+++ src/sys/arch/sgimips/sgimips/cpu.c 2009/12/15 06:01:43 1.23
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cpu.c,v 1.22 2009/12/14 00:46:13 matt Exp $ */ | 1 | /* $NetBSD: cpu.c,v 1.23 2009/12/15 06:01:43 mrg Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000 Soren S. Jorvang | 4 | * Copyright (c) 2000 Soren S. Jorvang | |
5 | * Copyright (c) 2001 Jason R. Thorpe. | 5 | * Copyright (c) 2001 Jason R. Thorpe. | |
6 | * Copyright (c) 2004 Christopher SEKIYA | 6 | * Copyright (c) 2004 Christopher SEKIYA | |
7 | * All rights reserved. | 7 | * All rights reserved. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -25,47 +25,47 @@ | @@ -25,47 +25,47 @@ | |||
25 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 25 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
26 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 26 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
27 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 27 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
28 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 28 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
29 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 29 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
30 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 30 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
31 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 31 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
32 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 32 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
33 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 33 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
34 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 34 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
35 | */ | 35 | */ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.22 2009/12/14 00:46:13 matt Exp $"); | 38 | __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.23 2009/12/15 06:01:43 mrg Exp $"); | |
39 | 39 | |||
40 | #include <sys/param.h> | 40 | #include <sys/param.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | #include <sys/systm.h> | 42 | #include <sys/systm.h> | |
43 | #include <sys/cpu.h> | 43 | #include <sys/cpu.h> | |
44 | 44 | |||
45 | #include <uvm/uvm_extern.h> | 45 | #include <uvm/uvm_extern.h> | |
46 | 46 | |||
47 | #include <machine/locore.h> | 47 | #include <machine/locore.h> | |
48 | #include <machine/psl.h> | 48 | #include <machine/psl.h> | |
49 | #include <machine/autoconf.h> | 49 | #include <machine/autoconf.h> | |
50 | #include <machine/machtype.h> | 50 | #include <machine/machtype.h> | |
51 | #include <machine/sysconf.h> | 51 | #include <machine/sysconf.h> | |
52 | 52 | |||
53 | #include <dev/arcbios/arcbios.h> | 53 | #include <dev/arcbios/arcbios.h> | |
54 | #include <dev/arcbios/arcbiosvar.h> | 54 | #include <dev/arcbios/arcbiosvar.h> | |
55 | 55 | |||
56 | static int cpu_match(struct device *, struct cfdata *, void *); | 56 | static int cpu_match(struct device *, struct cfdata *, void *); | |
57 | static void cpu_attach(struct device *, struct device *, void *); | 57 | static void cpu_attach(struct device *, struct device *, void *); | |
58 | void cpu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t); | 58 | void cpu_intr(uint32_t, uint32_t, vaddr_t, uint32_t); | |
59 | void *cpu_intr_establish(int, int, int (*func)(void *), void *); | 59 | void *cpu_intr_establish(int, int, int (*func)(void *), void *); | |
60 | void mips1_fpu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t); | 60 | void mips1_fpu_intr(u_int32_t, u_int32_t, u_int32_t, u_int32_t); | |
61 | 61 | |||
62 | extern void MachFPInterrupt(u_int32_t, u_int32_t, u_int32_t, struct frame *); | 62 | extern void MachFPInterrupt(u_int32_t, u_int32_t, u_int32_t, struct frame *); | |
63 | 63 | |||
64 | static struct evcnt mips_int0_evcnt = | 64 | static struct evcnt mips_int0_evcnt = | |
65 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 0"); | 65 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 0"); | |
66 | 66 | |||
67 | static struct evcnt mips_int1_evcnt = | 67 | static struct evcnt mips_int1_evcnt = | |
68 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 1"); | 68 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 1"); | |
69 | 69 | |||
70 | static struct evcnt mips_int2_evcnt = | 70 | static struct evcnt mips_int2_evcnt = | |
71 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 2"); | 71 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "mips", "int 2"); | |
@@ -93,27 +93,27 @@ cpu_match(struct device *parent, struct | @@ -93,27 +93,27 @@ cpu_match(struct device *parent, struct | |||
93 | 93 | |||
94 | static void | 94 | static void | |
95 | cpu_attach(struct device *parent, struct device *self, void *aux) | 95 | cpu_attach(struct device *parent, struct device *self, void *aux) | |
96 | { | 96 | { | |
97 | printf(": "); | 97 | printf(": "); | |
98 | cpu_identify(); | 98 | cpu_identify(); | |
99 | } | 99 | } | |
100 | 100 | |||
101 | /* | 101 | /* | |
102 | * NB: Do not re-enable interrupts here -- reentrancy here can cause all | 102 | * NB: Do not re-enable interrupts here -- reentrancy here can cause all | |
103 | * sorts of Bad Things(tm) to happen, including kernel stack overflows. | 103 | * sorts of Bad Things(tm) to happen, including kernel stack overflows. | |
104 | */ | 104 | */ | |
105 | void | 105 | void | |
106 | cpu_intr(u_int32_t status, u_int32_t cause, vaddr_t pc, u_int32_t ipending) | 106 | cpu_intr(uint32_t status, uint32_t cause, vaddr_t pc, uint32_t ipending) | |
107 | { | 107 | { | |
108 | struct cpu_info *ci; | 108 | struct cpu_info *ci; | |
109 | 109 | |||
110 | ci = curcpu(); | 110 | ci = curcpu(); | |
111 | ci->ci_idepth++; | 111 | ci->ci_idepth++; | |
112 | uvmexp.intrs++; | 112 | uvmexp.intrs++; | |
113 | 113 | |||
114 | (void)(*platform.watchdog_reset)(); | 114 | (void)(*platform.watchdog_reset)(); | |
115 | 115 | |||
116 | if (ipending & MIPS_HARD_INT_MASK) { | 116 | if (ipending & MIPS_HARD_INT_MASK) { | |
117 | if (ipending & MIPS_INT_MASK_5) { | 117 | if (ipending & MIPS_INT_MASK_5) { | |
118 | (void)(*platform.intr5)(status, cause, pc, ipending); | 118 | (void)(*platform.intr5)(status, cause, pc, ipending); | |
119 | mips_int5_evcnt.ev_count++; | 119 | mips_int5_evcnt.ev_count++; |