For ports with __HAVE_LEGACY_INTRCNT, turn intrcnt[] and derived variables into u_int, to match with kern/subr_evcnt.c.diff -r1.21 -r1.22 src/sys/arch/atari/include/intr.h
(rin)
--- src/sys/arch/atari/include/intr.h 2009/07/08 12:23:10 1.21
+++ src/sys/arch/atari/include/intr.h 2021/04/02 12:11:41 1.22
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: intr.h,v 1.21 2009/07/08 12:23:10 tsutsui Exp $ */ | 1 | /* $NetBSD: intr.h,v 1.22 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997, 2007 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997, 2007 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 Leo Weppelman. | 8 | * by Leo Weppelman. | |
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. | |
@@ -104,33 +104,33 @@ struct clockframe; | @@ -104,33 +104,33 @@ struct clockframe; | |||
104 | * Interrupt handler chains. intr_establish() inserts a handler into | 104 | * Interrupt handler chains. intr_establish() inserts a handler into | |
105 | * the list. The handler is called with its (single) argument or with a | 105 | * the list. The handler is called with its (single) argument or with a | |
106 | * 'standard' clockframe. This depends on 'ih_type'. | 106 | * 'standard' clockframe. This depends on 'ih_type'. | |
107 | */ | 107 | */ | |
108 | typedef int (*hw_ifun_t)(void *, int); | 108 | typedef int (*hw_ifun_t)(void *, int); | |
109 | 109 | |||
110 | struct intrhand { | 110 | struct intrhand { | |
111 | LIST_ENTRY(intrhand) ih_link; | 111 | LIST_ENTRY(intrhand) ih_link; | |
112 | hw_ifun_t ih_fun; | 112 | hw_ifun_t ih_fun; | |
113 | void *ih_arg; | 113 | void *ih_arg; | |
114 | int ih_type; | 114 | int ih_type; | |
115 | int ih_pri; | 115 | int ih_pri; | |
116 | int ih_vector; | 116 | int ih_vector; | |
117 | u_long *ih_intrcnt; | 117 | u_int *ih_intrcnt; | |
118 | }; | 118 | }; | |
119 | 119 | |||
120 | void intr_init(void); | 120 | void intr_init(void); | |
121 | struct intrhand *intr_establish(int, int, int, hw_ifun_t, void *); | 121 | struct intrhand *intr_establish(int, int, int, hw_ifun_t, void *); | |
122 | int intr_disestablish(struct intrhand *); | 122 | int intr_disestablish(struct intrhand *); | |
123 | void intr_dispatch(struct clockframe); | 123 | void intr_dispatch(struct clockframe); | |
124 | void intr_glue(void); | 124 | void intr_glue(void); | |
125 | 125 | |||
126 | /* | 126 | /* | |
127 | * Exported by intrcnt.h | 127 | * Exported by intrcnt.h | |
128 | */ | 128 | */ | |
129 | extern u_long autovects[]; | 129 | extern u_long autovects[]; | |
130 | extern u_long intrcnt_auto[]; | 130 | extern u_int intrcnt_auto[]; | |
131 | extern u_long uservects[]; | 131 | extern u_long uservects[]; | |
132 | extern u_long intrcnt_user[]; | 132 | extern u_int intrcnt_user[]; | |
133 | 133 | |||
134 | #endif /* _KERNEL */ | 134 | #endif /* _KERNEL */ | |
135 | 135 | |||
136 | #endif /* _ATARI_INTR_H_ */ | 136 | #endif /* _ATARI_INTR_H_ */ |
--- src/sys/arch/cesfic/cesfic/isr.c 2020/11/18 03:40:50 1.18
+++ src/sys/arch/cesfic/cesfic/isr.c 2021/04/02 12:11:41 1.19
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: isr.c,v 1.18 2020/11/18 03:40:50 thorpej Exp $ */ | 1 | /* $NetBSD: isr.c,v 1.19 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996 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 Adam Glass, Gordon W. Ross, and Jason R. Thorpe. | 8 | * by Adam Glass, Gordon W. Ross, and 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. | |
@@ -24,43 +24,43 @@ | @@ -24,43 +24,43 @@ | |||
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 | /* | 32 | /* | |
33 | * Link and dispatch interrupts. | 33 | * Link and dispatch interrupts. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.18 2020/11/18 03:40:50 thorpej Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.19 2021/04/02 12:11:41 rin Exp $"); | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/queue.h> | 41 | #include <sys/queue.h> | |
42 | #include <sys/kmem.h> | 42 | #include <sys/kmem.h> | |
43 | #include <sys/vmmeter.h> | 43 | #include <sys/vmmeter.h> | |
44 | #include <sys/cpu.h> | 44 | #include <sys/cpu.h> | |
45 | 45 | |||
46 | #include <uvm/uvm_extern.h> | 46 | #include <uvm/uvm_extern.h> | |
47 | 47 | |||
48 | #include <cesfic/cesfic/isr.h> | 48 | #include <cesfic/cesfic/isr.h> | |
49 | 49 | |||
50 | typedef LIST_HEAD(, isr) isr_list_t; | 50 | typedef LIST_HEAD(, isr) isr_list_t; | |
51 | isr_list_t isr_list[NISR]; | 51 | isr_list_t isr_list[NISR]; | |
52 | 52 | |||
53 | extern int intrcnt[]; /* from locore.s */ | 53 | extern u_int intrcnt[]; /* from locore.s */ | |
54 | 54 | |||
55 | void | 55 | void | |
56 | isrinit(void) | 56 | isrinit(void) | |
57 | { | 57 | { | |
58 | int i; | 58 | int i; | |
59 | 59 | |||
60 | /* Initialize the ISR lists. */ | 60 | /* Initialize the ISR lists. */ | |
61 | for (i = 0; i < NISR; ++i) { | 61 | for (i = 0; i < NISR; ++i) { | |
62 | LIST_INIT(&isr_list[i]); | 62 | LIST_INIT(&isr_list[i]); | |
63 | } | 63 | } | |
64 | } | 64 | } | |
65 | 65 | |||
66 | /* | 66 | /* |
--- src/sys/arch/luna68k/luna68k/isr.c 2020/12/19 21:38:30 1.24
+++ src/sys/arch/luna68k/luna68k/isr.c 2021/04/02 12:11:41 1.25
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: isr.c,v 1.24 2020/12/19 21:38:30 thorpej Exp $ */ | 1 | /* $NetBSD: isr.c,v 1.25 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996 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 Adam Glass, Gordon W. Ross, and Jason R. Thorpe. | 8 | * by Adam Glass, Gordon W. Ross, and 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. | |
@@ -21,47 +21,47 @@ | @@ -21,47 +21,47 @@ | |||
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> /* RCS ID & Copyright macro defns */ | 32 | #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ | |
33 | 33 | |||
34 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.24 2020/12/19 21:38:30 thorpej Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.25 2021/04/02 12:11:41 rin Exp $"); | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * Link and dispatch interrupts. | 37 | * Link and dispatch interrupts. | |
38 | */ | 38 | */ | |
39 | 39 | |||
40 | #include <sys/param.h> | 40 | #include <sys/param.h> | |
41 | #include <sys/systm.h> | 41 | #include <sys/systm.h> | |
42 | #include <sys/kmem.h> | 42 | #include <sys/kmem.h> | |
43 | #include <sys/vmmeter.h> | 43 | #include <sys/vmmeter.h> | |
44 | #include <sys/cpu.h> | 44 | #include <sys/cpu.h> | |
45 | 45 | |||
46 | #include <uvm/uvm_extern.h> | 46 | #include <uvm/uvm_extern.h> | |
47 | 47 | |||
48 | #include <luna68k/luna68k/isr.h> | 48 | #include <luna68k/luna68k/isr.h> | |
49 | 49 | |||
50 | isr_autovec_list_t isr_autovec[NISRAUTOVEC]; | 50 | isr_autovec_list_t isr_autovec[NISRAUTOVEC]; | |
51 | struct isr_vectored isr_vectored[NISRVECTORED]; | 51 | struct isr_vectored isr_vectored[NISRVECTORED]; | |
52 | int idepth; | 52 | int idepth; | |
53 | 53 | |||
54 | extern int intrcnt[]; /* from locore.s */ | 54 | extern u_int intrcnt[]; /* from locore.s */ | |
55 | extern void (*vectab[])(void); | 55 | extern void (*vectab[])(void); | |
56 | extern void badtrap(void); | 56 | extern void badtrap(void); | |
57 | extern void intrhand_vectored(void); | 57 | extern void intrhand_vectored(void); | |
58 | 58 | |||
59 | extern int getsr(void); /* in locore.s */ | 59 | extern int getsr(void); /* in locore.s */ | |
60 | 60 | |||
61 | void | 61 | void | |
62 | isrinit(void) | 62 | isrinit(void) | |
63 | { | 63 | { | |
64 | int i; | 64 | int i; | |
65 | 65 | |||
66 | /* Initialize the autovector lists. */ | 66 | /* Initialize the autovector lists. */ | |
67 | for (i = 0; i < NISRAUTOVEC; ++i) { | 67 | for (i = 0; i < NISRAUTOVEC; ++i) { |
--- src/sys/arch/mac68k/mac68k/intr.c 2020/07/21 06:10:26 1.31
+++ src/sys/arch/mac68k/mac68k/intr.c 2021/04/02 12:11:41 1.32
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: intr.c,v 1.31 2020/07/21 06:10:26 rin Exp $ */ | 1 | /* $NetBSD: intr.c,v 1.32 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996, 1997 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 Adam Glass, Gordon W. Ross, and Jason R. Thorpe. | 8 | * by Adam Glass, Gordon W. Ross, and 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. | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
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 | /* | 32 | /* | |
33 | * Link and dispatch interrupts. | 33 | * Link and dispatch interrupts. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.31 2020/07/21 06:10:26 rin Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.32 2021/04/02 12:11:41 rin Exp $"); | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/malloc.h> | 41 | #include <sys/malloc.h> | |
42 | #include <sys/vmmeter.h> | 42 | #include <sys/vmmeter.h> | |
43 | #include <sys/cpu.h> | 43 | #include <sys/cpu.h> | |
44 | #include <sys/intr.h> | 44 | #include <sys/intr.h> | |
45 | 45 | |||
46 | #include <machine/psc.h> | 46 | #include <machine/psc.h> | |
47 | #include <machine/viareg.h> | 47 | #include <machine/viareg.h> | |
48 | 48 | |||
49 | #define NISR 8 | 49 | #define NISR 8 | |
50 | #define ISRLOC 0x18 | 50 | #define ISRLOC 0x18 | |
@@ -75,27 +75,27 @@ static void *intr_arg[NISR] = { | @@ -75,27 +75,27 @@ static void *intr_arg[NISR] = { | |||
75 | #ifdef DEBUG | 75 | #ifdef DEBUG | |
76 | int intr_debug = 0; | 76 | int intr_debug = 0; | |
77 | #endif | 77 | #endif | |
78 | 78 | |||
79 | /* | 79 | /* | |
80 | * Some of the below are not used yet, but might be used someday on the | 80 | * Some of the below are not used yet, but might be used someday on the | |
81 | * IIfx/Q700/900/950/etc. where the interrupt controller may be reprogrammed | 81 | * IIfx/Q700/900/950/etc. where the interrupt controller may be reprogrammed | |
82 | * to interrupt on different levels as listed in locore.s | 82 | * to interrupt on different levels as listed in locore.s | |
83 | */ | 83 | */ | |
84 | uint16_t ipl2psl_table[NIPL]; | 84 | uint16_t ipl2psl_table[NIPL]; | |
85 | int idepth; | 85 | int idepth; | |
86 | volatile int ssir; | 86 | volatile int ssir; | |
87 | 87 | |||
88 | extern int intrcnt[]; /* from locore.s */ | 88 | extern u_int intrcnt[]; /* from locore.s */ | |
89 | 89 | |||
90 | void intr_computeipl(void); | 90 | void intr_computeipl(void); | |
91 | 91 | |||
92 | #define MAX_INAME_LENGTH 53 | 92 | #define MAX_INAME_LENGTH 53 | |
93 | #define STD_INAMES \ | 93 | #define STD_INAMES \ | |
94 | "spur\0via1\0via2\0unused1\0scc\0unused2\0unused3\0nmi\0clock\0" | 94 | "spur\0via1\0via2\0unused1\0scc\0unused2\0unused3\0nmi\0clock\0" | |
95 | #define AUX_INAMES \ | 95 | #define AUX_INAMES \ | |
96 | "spur\0soft\0via2\0ethernet\0scc\0sound\0via1\0nmi\0clock\0 " | 96 | "spur\0soft\0via2\0ethernet\0scc\0sound\0via1\0nmi\0clock\0 " | |
97 | #define AV_INAMES \ | 97 | #define AV_INAMES \ | |
98 | "spur\0via1\0via2\0ethernet\0scc\0dsp\0unused1\0nmi\0clock\0 " | 98 | "spur\0via1\0via2\0ethernet\0scc\0dsp\0unused1\0nmi\0clock\0 " | |
99 | 99 | |||
100 | void | 100 | void | |
101 | intr_init(void) | 101 | intr_init(void) |
--- src/sys/arch/mvme68k/mvme68k/isr.c 2020/11/21 17:59:13 1.35
+++ src/sys/arch/mvme68k/mvme68k/isr.c 2021/04/02 12:11:41 1.36
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: isr.c,v 1.35 2020/11/21 17:59:13 thorpej Exp $ */ | 1 | /* $NetBSD: isr.c,v 1.36 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 1996 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 Adam Glass, Gordon W. Ross, and Jason R. Thorpe. | 8 | * by Adam Glass, Gordon W. Ross, and 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. | |
@@ -24,27 +24,27 @@ | @@ -24,27 +24,27 @@ | |||
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 | /* | 32 | /* | |
33 | * Link and dispatch interrupts. | 33 | * Link and dispatch interrupts. | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | #include <sys/cdefs.h> | 36 | #include <sys/cdefs.h> | |
37 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.35 2020/11/21 17:59:13 thorpej Exp $"); | 37 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.36 2021/04/02 12:11:41 rin Exp $"); | |
38 | 38 | |||
39 | #include <sys/param.h> | 39 | #include <sys/param.h> | |
40 | #include <sys/systm.h> | 40 | #include <sys/systm.h> | |
41 | #include <sys/kmem.h> | 41 | #include <sys/kmem.h> | |
42 | #include <sys/vmmeter.h> | 42 | #include <sys/vmmeter.h> | |
43 | #include <sys/device.h> | 43 | #include <sys/device.h> | |
44 | #include <sys/cpu.h> | 44 | #include <sys/cpu.h> | |
45 | 45 | |||
46 | #include <uvm/uvm_extern.h> | 46 | #include <uvm/uvm_extern.h> | |
47 | 47 | |||
48 | #include <mvme68k/mvme68k/isr.h> | 48 | #include <mvme68k/mvme68k/isr.h> | |
49 | 49 | |||
50 | volatile unsigned int interrupt_depth; | 50 | volatile unsigned int interrupt_depth; | |
@@ -53,27 +53,27 @@ struct isr_vectored isr_vectored[NISRVEC | @@ -53,27 +53,27 @@ struct isr_vectored isr_vectored[NISRVEC | |||
53 | static const char irqgroupname[] = "hard irqs"; | 53 | static const char irqgroupname[] = "hard irqs"; | |
54 | struct evcnt mvme68k_irq_evcnt[] = { | 54 | struct evcnt mvme68k_irq_evcnt[] = { | |
55 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "spur"), | 55 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "spur"), | |
56 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev1"), | 56 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev1"), | |
57 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev2"), | 57 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev2"), | |
58 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev3"), | 58 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev3"), | |
59 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev4"), | 59 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev4"), | |
60 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev5"), | 60 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev5"), | |
61 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev6"), | 61 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev6"), | |
62 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "nmi") | 62 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "nmi") | |
63 | }; | 63 | }; | |
64 | static int idepth; | 64 | static int idepth; | |
65 | 65 | |||
66 | extern int intrcnt[]; /* from locore.s. XXXSCW: will go away soon */ | 66 | extern u_int intrcnt[]; /* from locore.s. XXXSCW: will go away soon */ | |
67 | extern void (*vectab[])(void); | 67 | extern void (*vectab[])(void); | |
68 | extern void badtrap(void); | 68 | extern void badtrap(void); | |
69 | extern void intrhand_vectored(void); | 69 | extern void intrhand_vectored(void); | |
70 | 70 | |||
71 | static int spurintr(void *); | 71 | static int spurintr(void *); | |
72 | 72 | |||
73 | 73 | |||
74 | void | 74 | void | |
75 | isrinit(void) | 75 | isrinit(void) | |
76 | { | 76 | { | |
77 | int i; | 77 | int i; | |
78 | 78 | |||
79 | /* Initialize the autovector lists. */ | 79 | /* Initialize the autovector lists. */ |
--- src/sys/arch/next68k/next68k/isr.c 2020/11/21 17:49:20 1.31
+++ src/sys/arch/next68k/next68k/isr.c 2021/04/02 12:11:41 1.32
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: isr.c,v 1.31 2020/11/21 17:49:20 thorpej Exp $ */ | 1 | /* $NetBSD: isr.c,v 1.32 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * This file was taken from mvme68k/mvme68k/isr.c | 4 | * This file was taken from mvme68k/mvme68k/isr.c | |
5 | * should probably be re-synced when needed. | 5 | * should probably be re-synced when needed. | |
6 | * Darrin B. Jewell <jewell@mit.edu> Tue Nov 10 05:07:16 1998 | 6 | * Darrin B. Jewell <jewell@mit.edu> Tue Nov 10 05:07:16 1998 | |
7 | * original cvs id: NetBSD: isr.c,v 1.12 1998/07/05 06:49:07 jonathan Exp | 7 | * original cvs id: NetBSD: isr.c,v 1.12 1998/07/05 06:49:07 jonathan Exp | |
8 | */ | 8 | */ | |
9 | 9 | |||
10 | /*- | 10 | /*- | |
11 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | 11 | * Copyright (c) 1996 The NetBSD Foundation, Inc. | |
12 | * All rights reserved. | 12 | * All rights reserved. | |
13 | * | 13 | * | |
14 | * This code is derived from software contributed to The NetBSD Foundation | 14 | * This code is derived from software contributed to The NetBSD Foundation | |
@@ -31,27 +31,27 @@ | @@ -31,27 +31,27 @@ | |||
31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 31 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 32 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 33 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 34 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 35 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
36 | * POSSIBILITY OF SUCH DAMAGE. | 36 | * POSSIBILITY OF SUCH DAMAGE. | |
37 | */ | 37 | */ | |
38 | 38 | |||
39 | /* | 39 | /* | |
40 | * Link and dispatch interrupts. | 40 | * Link and dispatch interrupts. | |
41 | */ | 41 | */ | |
42 | 42 | |||
43 | #include <sys/cdefs.h> | 43 | #include <sys/cdefs.h> | |
44 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.31 2020/11/21 17:49:20 thorpej Exp $"); | 44 | __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.32 2021/04/02 12:11:41 rin Exp $"); | |
45 | 45 | |||
46 | #include <sys/param.h> | 46 | #include <sys/param.h> | |
47 | #include <sys/systm.h> | 47 | #include <sys/systm.h> | |
48 | #include <sys/kmem.h> | 48 | #include <sys/kmem.h> | |
49 | #include <sys/vmmeter.h> | 49 | #include <sys/vmmeter.h> | |
50 | #include <sys/device.h> | 50 | #include <sys/device.h> | |
51 | #include <sys/bus.h> | 51 | #include <sys/bus.h> | |
52 | #include <sys/cpu.h> | 52 | #include <sys/cpu.h> | |
53 | 53 | |||
54 | #include <uvm/uvm_extern.h> | 54 | #include <uvm/uvm_extern.h> | |
55 | 55 | |||
56 | #include <next68k/next68k/isr.h> | 56 | #include <next68k/next68k/isr.h> | |
57 | 57 | |||
@@ -64,27 +64,27 @@ static const char irqgroupname[] = "hard | @@ -64,27 +64,27 @@ static const char irqgroupname[] = "hard | |||
64 | struct evcnt next68k_irq_evcnt[] = { | 64 | struct evcnt next68k_irq_evcnt[] = { | |
65 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "spur"), | 65 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "spur"), | |
66 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev1"), | 66 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev1"), | |
67 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev2"), | 67 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev2"), | |
68 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev3"), | 68 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev3"), | |
69 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev4"), | 69 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev4"), | |
70 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev5"), | 70 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev5"), | |
71 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev6"), | 71 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "lev6"), | |
72 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "nmi") | 72 | EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, irqgroupname, "nmi") | |
73 | }; | 73 | }; | |
74 | 74 | |||
75 | int idepth; | 75 | int idepth; | |
76 | int ssir; | 76 | int ssir; | |
77 | extern int intrcnt[]; /* from locore.s. XXXSCW: will go away soon */ | 77 | extern u_int intrcnt[]; /* from locore.s. XXXSCW: will go away soon */ | |
78 | extern void (*vectab[])(void); | 78 | extern void (*vectab[])(void); | |
79 | extern void badtrap(void); | 79 | extern void badtrap(void); | |
80 | extern void intrhand_vectored(void); | 80 | extern void intrhand_vectored(void); | |
81 | 81 | |||
82 | #if 0 | 82 | #if 0 | |
83 | static int spurintr(void *); | 83 | static int spurintr(void *); | |
84 | #endif | 84 | #endif | |
85 | 85 | |||
86 | void | 86 | void | |
87 | isrinit(void) | 87 | isrinit(void) | |
88 | { | 88 | { | |
89 | int i; | 89 | int i; | |
90 | 90 |
--- src/sys/arch/sun3/sun3/clock.c 2013/09/07 15:56:11 1.64
+++ src/sys/arch/sun3/sun3/clock.c 2021/04/02 12:11:41 1.65
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: clock.c,v 1.64 2013/09/07 15:56:11 tsutsui Exp $ */ | 1 | /* $NetBSD: clock.c,v 1.65 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1990, 1993 | 4 | * Copyright (c) 1982, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
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 | |
@@ -73,52 +73,52 @@ | @@ -73,52 +73,52 @@ | |||
73 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 73 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
74 | * SUCH DAMAGE. | 74 | * SUCH DAMAGE. | |
75 | * | 75 | * | |
76 | * from: Utah Hdr: clock.c 1.18 91/01/21$ | 76 | * from: Utah Hdr: clock.c 1.18 91/01/21$ | |
77 | * from: @(#)clock.c 8.2 (Berkeley) 1/12/94 | 77 | * from: @(#)clock.c 8.2 (Berkeley) 1/12/94 | |
78 | */ | 78 | */ | |
79 | 79 | |||
80 | /* | 80 | /* | |
81 | * Machine-dependent clock routines for the Intersil 7170: | 81 | * Machine-dependent clock routines for the Intersil 7170: | |
82 | * Original by Adam Glass; partially rewritten by Gordon Ross. | 82 | * Original by Adam Glass; partially rewritten by Gordon Ross. | |
83 | */ | 83 | */ | |
84 | 84 | |||
85 | #include <sys/cdefs.h> | 85 | #include <sys/cdefs.h> | |
86 | __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.64 2013/09/07 15:56:11 tsutsui Exp $"); | 86 | __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.65 2021/04/02 12:11:41 rin Exp $"); | |
87 | 87 | |||
88 | #include <sys/param.h> | 88 | #include <sys/param.h> | |
89 | #include <sys/systm.h> | 89 | #include <sys/systm.h> | |
90 | #include <sys/time.h> | 90 | #include <sys/time.h> | |
91 | #include <sys/kernel.h> | 91 | #include <sys/kernel.h> | |
92 | #include <sys/device.h> | 92 | #include <sys/device.h> | |
93 | 93 | |||
94 | #include <uvm/uvm_extern.h> | 94 | #include <uvm/uvm_extern.h> | |
95 | 95 | |||
96 | #include <m68k/asm_single.h> | 96 | #include <m68k/asm_single.h> | |
97 | 97 | |||
98 | #include <machine/autoconf.h> | 98 | #include <machine/autoconf.h> | |
99 | #include <machine/bus.h> | 99 | #include <machine/bus.h> | |
100 | #include <machine/cpu.h> | 100 | #include <machine/cpu.h> | |
101 | #include <machine/leds.h> | 101 | #include <machine/leds.h> | |
102 | 102 | |||
103 | #include <sun3/sun3/control.h> | 103 | #include <sun3/sun3/control.h> | |
104 | #include <sun3/sun3/interreg.h> | 104 | #include <sun3/sun3/interreg.h> | |
105 | #include <sun3/sun3/machdep.h> | 105 | #include <sun3/sun3/machdep.h> | |
106 | 106 | |||
107 | #include <dev/clock_subr.h> | 107 | #include <dev/clock_subr.h> | |
108 | #include <dev/ic/intersil7170reg.h> | 108 | #include <dev/ic/intersil7170reg.h> | |
109 | #include <dev/ic/intersil7170var.h> | 109 | #include <dev/ic/intersil7170var.h> | |
110 | 110 | |||
111 | extern int intrcnt[]; | 111 | extern u_int intrcnt[]; | |
112 | 112 | |||
113 | #define CLOCK_PRI 5 | 113 | #define CLOCK_PRI 5 | |
114 | #define IREG_CLK_BITS (IREG_CLOCK_ENAB_7 | IREG_CLOCK_ENAB_5) | 114 | #define IREG_CLK_BITS (IREG_CLOCK_ENAB_7 | IREG_CLOCK_ENAB_5) | |
115 | 115 | |||
116 | void _isr_clock(void); /* in locore.s */ | 116 | void _isr_clock(void); /* in locore.s */ | |
117 | void clock_intr(struct clockframe); | 117 | void clock_intr(struct clockframe); | |
118 | 118 | |||
119 | static volatile void *intersil_va; | 119 | static volatile void *intersil_va; | |
120 | 120 | |||
121 | #define intersil_clock ((volatile struct intersil7170 *)intersil_va) | 121 | #define intersil_clock ((volatile struct intersil7170 *)intersil_va) | |
122 | 122 | |||
123 | #define intersil_clear() (void)intersil_clock->clk_intr_reg | 123 | #define intersil_clear() (void)intersil_clock->clk_intr_reg | |
124 | 124 |
--- src/sys/arch/sun3/sun3x/clock.c 2013/09/06 17:43:19 1.40
+++ src/sys/arch/sun3/sun3x/clock.c 2021/04/02 12:11:41 1.41
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: clock.c,v 1.40 2013/09/06 17:43:19 tsutsui Exp $ */ | 1 | /* $NetBSD: clock.c,v 1.41 2021/04/02 12:11:41 rin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1982, 1990, 1993 | 4 | * Copyright (c) 1982, 1990, 1993 | |
5 | * The Regents of the University of California. All rights reserved. | 5 | * The Regents of the University of California. All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to Berkeley by | 7 | * This code is derived from software contributed to Berkeley by | |
8 | * the Systems Programming Group of the University of Utah Computer | 8 | * the Systems Programming Group of the University of Utah Computer | |
9 | * Science Department. | 9 | * Science Department. | |
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 | |
@@ -85,54 +85,54 @@ | @@ -85,54 +85,54 @@ | |||
85 | * always something responding at the address where the Mostek | 85 | * always something responding at the address where the Mostek | |
86 | * clock might be found: either a Mostek or plain-old EEPROM. | 86 | * clock might be found: either a Mostek or plain-old EEPROM. | |
87 | * Therefore, we cheat. If we find an Intersil clock, assume | 87 | * Therefore, we cheat. If we find an Intersil clock, assume | |
88 | * that what responds at the end of the EEPROM space is just | 88 | * that what responds at the end of the EEPROM space is just | |
89 | * plain-old EEPROM (not a Mostek clock). Worse, there are | 89 | * plain-old EEPROM (not a Mostek clock). Worse, there are | |
90 | * H/W problems with probing for an Intersil on the 3/80, so | 90 | * H/W problems with probing for an Intersil on the 3/80, so | |
91 | * on that machine we "know" there is a Mostek clock. | 91 | * on that machine we "know" there is a Mostek clock. | |
92 | * | 92 | * | |
93 | * Note that the probing algorithm described above requires | 93 | * Note that the probing algorithm described above requires | |
94 | * that we probe the intersil before we probe the mostek! | 94 | * that we probe the intersil before we probe the mostek! | |
95 | */ | 95 | */ | |
96 | 96 | |||
97 | #include <sys/cdefs.h> | 97 | #include <sys/cdefs.h> | |
98 | __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.40 2013/09/06 17:43:19 tsutsui Exp $"); | 98 | __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.41 2021/04/02 12:11:41 rin Exp $"); | |
99 | 99 | |||
100 | #include <sys/param.h> | 100 | #include <sys/param.h> | |
101 | #include <sys/systm.h> | 101 | #include <sys/systm.h> | |
102 | #include <sys/time.h> | 102 | #include <sys/time.h> | |
103 | #include <sys/kernel.h> | 103 | #include <sys/kernel.h> | |
104 | #include <sys/device.h> | 104 | #include <sys/device.h> | |
105 | 105 | |||
106 | #include <uvm/uvm_extern.h> | 106 | #include <uvm/uvm_extern.h> | |
107 | 107 | |||
108 | #include <m68k/asm_single.h> | 108 | #include <m68k/asm_single.h> | |
109 | 109 | |||
110 | #include <machine/autoconf.h> | 110 | #include <machine/autoconf.h> | |
111 | #include <machine/bus.h> | 111 | #include <machine/bus.h> | |
112 | #include <machine/cpu.h> | 112 | #include <machine/cpu.h> | |
113 | #include <machine/idprom.h> | 113 | #include <machine/idprom.h> | |
114 | #include <machine/leds.h> | 114 | #include <machine/leds.h> | |
115 | 115 | |||
116 | #include <dev/clock_subr.h> | 116 | #include <dev/clock_subr.h> | |
117 | #include <dev/ic/intersil7170reg.h> | 117 | #include <dev/ic/intersil7170reg.h> | |
118 | #include <dev/ic/intersil7170var.h> | 118 | #include <dev/ic/intersil7170var.h> | |
119 | #include <dev/ic/mk48txxreg.h> | 119 | #include <dev/ic/mk48txxreg.h> | |
120 | #include <dev/ic/mk48txxvar.h> | 120 | #include <dev/ic/mk48txxvar.h> | |
121 | 121 | |||
122 | #include <sun3/sun3/machdep.h> | 122 | #include <sun3/sun3/machdep.h> | |
123 | #include <sun3/sun3/interreg.h> | 123 | #include <sun3/sun3/interreg.h> | |
124 | 124 | |||
125 | extern int intrcnt[]; | 125 | extern u_int intrcnt[]; | |
126 | 126 | |||
127 | #define SUN3_470 Yes | 127 | #define SUN3_470 Yes | |
128 | 128 | |||
129 | #define CLOCK_PRI 5 | 129 | #define CLOCK_PRI 5 | |
130 | #define IREG_CLK_BITS (IREG_CLOCK_ENAB_7 | IREG_CLOCK_ENAB_5) | 130 | #define IREG_CLK_BITS (IREG_CLOCK_ENAB_7 | IREG_CLOCK_ENAB_5) | |
131 | 131 | |||
132 | #define MKCLOCK_REG_OFFSET (MK48T02_CLKOFF + MK48TXX_ICSR) | 132 | #define MKCLOCK_REG_OFFSET (MK48T02_CLKOFF + MK48TXX_ICSR) | |
133 | 133 | |||
134 | /* | 134 | /* | |
135 | * Only one of these two variables should be non-zero after | 135 | * Only one of these two variables should be non-zero after | |
136 | * autoconfiguration determines which clock we have. | 136 | * autoconfiguration determines which clock we have. | |
137 | */ | 137 | */ | |
138 | static volatile void *intersil_va; | 138 | static volatile void *intersil_va; |