device_t, cfdata_t, etc. CFATTACH_DECL -> CFATTACH_DECL_NEW for sizeof(struct device).diff -r1.92 -r1.93 src/sys/arch/vax/include/cpu.h
(matt)
--- src/sys/arch/vax/include/cpu.h 2011/04/14 08:17:27 1.92
+++ src/sys/arch/vax/include/cpu.h 2011/06/05 16:59:21 1.93
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cpu.h,v 1.92 2011/04/14 08:17:27 matt Exp $ */ | 1 | /* $NetBSD: cpu.h,v 1.93 2011/06/05 16:59:21 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 1994 Ludd, University of Lule}, Sweden | 4 | * Copyright (c) 1994 Ludd, University of Lule}, Sweden | |
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. | |
@@ -113,27 +113,27 @@ extern const struct cpu_mp_dep *mp_dep_c | @@ -113,27 +113,27 @@ extern const struct cpu_mp_dep *mp_dep_c | |||
113 | extern const struct cpu_dep *dep_call; | 113 | extern const struct cpu_dep *dep_call; | |
114 | /* Holds pointer to current CPU struct. */ | 114 | /* Holds pointer to current CPU struct. */ | |
115 | 115 | |||
116 | struct clockframe { | 116 | struct clockframe { | |
117 | int pc; | 117 | int pc; | |
118 | int ps; | 118 | int ps; | |
119 | }; | 119 | }; | |
120 | 120 | |||
121 | struct cpu_info { | 121 | struct cpu_info { | |
122 | /* | 122 | /* | |
123 | * Public members. | 123 | * Public members. | |
124 | */ | 124 | */ | |
125 | struct cpu_data ci_data; /* MI per-cpu data */ | 125 | struct cpu_data ci_data; /* MI per-cpu data */ | |
126 | struct device *ci_dev; /* device struct for this cpu */ | 126 | device_t ci_dev; /* device struct for this cpu */ | |
127 | int ci_mtx_oldspl; /* saved spl */ | 127 | int ci_mtx_oldspl; /* saved spl */ | |
128 | int ci_mtx_count; /* negative count of mutexes */ | 128 | int ci_mtx_count; /* negative count of mutexes */ | |
129 | int ci_cpuid; /* h/w specific cpu id */ | 129 | int ci_cpuid; /* h/w specific cpu id */ | |
130 | int ci_want_resched; /* Should change process */ | 130 | int ci_want_resched; /* Should change process */ | |
131 | 131 | |||
132 | /* | 132 | /* | |
133 | * Private members. | 133 | * Private members. | |
134 | */ | 134 | */ | |
135 | #if defined(__HAVE_FAST_SOFTINTS) | 135 | #if defined(__HAVE_FAST_SOFTINTS) | |
136 | lwp_t *ci_softlwps[SOFTINT_COUNT]; | 136 | lwp_t *ci_softlwps[SOFTINT_COUNT]; | |
137 | #endif | 137 | #endif | |
138 | vaddr_t ci_istack; /* Interrupt stack location */ | 138 | vaddr_t ci_istack; /* Interrupt stack location */ | |
139 | const char *ci_cpustr; | 139 | const char *ci_cpustr; |
--- src/sys/arch/vax/include/nexus.h 2010/07/01 19:50:12 1.26
+++ src/sys/arch/vax/include/nexus.h 2011/06/05 16:59:21 1.27
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: nexus.h,v 1.26 2010/07/01 19:50:12 ragge Exp $ */ | 1 | /* $NetBSD: nexus.h,v 1.27 2011/06/05 16:59:21 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1982, 1986 The Regents of the University of California. | 4 | * Copyright (c) 1982, 1986 The Regents of the University of California. | |
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. | |
@@ -104,27 +104,27 @@ struct abus_attach_args { | @@ -104,27 +104,27 @@ struct abus_attach_args { | |||
104 | 104 | |||
105 | struct sbi_attach_args { | 105 | struct sbi_attach_args { | |
106 | int sa_nexnum; /* This nexus TR number */ | 106 | int sa_nexnum; /* This nexus TR number */ | |
107 | int sa_type; /* This nexus type */ | 107 | int sa_type; /* This nexus type */ | |
108 | int sa_sbinum; | 108 | int sa_sbinum; | |
109 | bus_space_tag_t sa_iot; | 109 | bus_space_tag_t sa_iot; | |
110 | bus_space_handle_t sa_ioh; | 110 | bus_space_handle_t sa_ioh; | |
111 | bus_dma_tag_t sa_dmat; | 111 | bus_dma_tag_t sa_dmat; | |
112 | bus_addr_t sa_base; | 112 | bus_addr_t sa_base; | |
113 | }; | 113 | }; | |
114 | 114 | |||
115 | /* Memory device struct. This should be somewhere else */ | 115 | /* Memory device struct. This should be somewhere else */ | |
116 | struct mem_softc { | 116 | struct mem_softc { | |
117 | struct device *sc_dev; | 117 | device_t sc_dev; | |
118 | void * sc_memaddr; | 118 | void * sc_memaddr; | |
119 | int sc_memtype; | 119 | int sc_memtype; | |
120 | int sc_memnr; | 120 | int sc_memnr; | |
121 | }; | 121 | }; | |
122 | 122 | |||
123 | struct ibus_attach_args { | 123 | struct ibus_attach_args { | |
124 | const char *ia_type; | 124 | const char *ia_type; | |
125 | int ia_num; | 125 | int ia_num; | |
126 | int ia_partyp; | 126 | int ia_partyp; | |
127 | paddr_t ia_addr; | 127 | paddr_t ia_addr; | |
128 | }; | 128 | }; | |
129 | #endif | 129 | #endif | |
130 | 130 |
--- src/sys/arch/vax/include/types.h 2010/12/22 01:03:18 1.41
+++ src/sys/arch/vax/include/types.h 2011/06/05 16:59:21 1.42
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: types.h,v 1.41 2010/12/22 01:03:18 matt Exp $ */ | 1 | /* $NetBSD: types.h,v 1.42 2011/06/05 16:59:21 matt Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 1990 The Regents of the University of California. | 4 | * Copyright (c) 1990 The Regents of the University of California. | |
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. | |
@@ -67,14 +67,16 @@ typedef int register_t; | @@ -67,14 +67,16 @@ typedef int register_t; | |||
67 | typedef volatile char __cpu_simple_lock_t; | 67 | typedef volatile char __cpu_simple_lock_t; | |
68 | 68 | |||
69 | #define __SIMPLELOCK_LOCKED 1 | 69 | #define __SIMPLELOCK_LOCKED 1 | |
70 | #define __SIMPLELOCK_UNLOCKED 0 | 70 | #define __SIMPLELOCK_UNLOCKED 0 | |
71 | 71 | |||
72 | /* The VAX does not have strict alignment requirements. */ | 72 | /* The VAX does not have strict alignment requirements. */ | |
73 | #define __NO_STRICT_ALIGNMENT | 73 | #define __NO_STRICT_ALIGNMENT | |
74 | 74 | |||
75 | #define __HAVE_DEVICE_REGISTER | 75 | #define __HAVE_DEVICE_REGISTER | |
76 | #define __HAVE_SYSCALL_INTERN | 76 | #define __HAVE_SYSCALL_INTERN | |
77 | #define __HAVE_FAST_SOFTINTS | 77 | #define __HAVE_FAST_SOFTINTS | |
78 | #define __HAVE_CPU_DATA_FIRST | 78 | #define __HAVE_CPU_DATA_FIRST | |
79 | 79 | |||
80 | #define __HAVE___LWP_GETPRIVATE_FAST | |||
81 | ||||
80 | #endif /* _MACHTYPES_H_ */ | 82 | #endif /* _MACHTYPES_H_ */ |
--- src/sys/arch/vax/uba/uba_ubi.c 2010/12/14 23:38:30 1.2
+++ src/sys/arch/vax/uba/uba_ubi.c 2011/06/05 16:59:21 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: uba_ubi.c,v 1.2 2010/12/14 23:38:30 matt Exp $ */ | 1 | /* $NetBSD: uba_ubi.c,v 1.3 2011/06/05 16:59:21 matt Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 1982, 1986 The Regents of the University of California. | 3 | * Copyright (c) 1982, 1986 The Regents of the University of California. | |
4 | * All rights reserved. | 4 | * 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. Neither the name of the University nor the names of its contributors | 14 | * 3. Neither the name of the University nor the names of its contributors | |
@@ -58,27 +58,27 @@ | @@ -58,27 +58,27 @@ | |||
58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
64 | * SUCH DAMAGE. | 64 | * SUCH DAMAGE. | |
65 | * | 65 | * | |
66 | * @(#)uba.c 7.10 (Berkeley) 12/16/90 | 66 | * @(#)uba.c 7.10 (Berkeley) 12/16/90 | |
67 | * @(#)autoconf.c 7.20 (Berkeley) 5/9/91 | 67 | * @(#)autoconf.c 7.20 (Berkeley) 5/9/91 | |
68 | */ | 68 | */ | |
69 | 69 | |||
70 | #include <sys/cdefs.h> | 70 | #include <sys/cdefs.h> | |
71 | __KERNEL_RCSID(0, "$NetBSD: uba_ubi.c,v 1.2 2010/12/14 23:38:30 matt Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: uba_ubi.c,v 1.3 2011/06/05 16:59:21 matt Exp $"); | |
72 | 72 | |||
73 | #define _VAX_BUS_DMA_PRIVATE | 73 | #define _VAX_BUS_DMA_PRIVATE | |
74 | 74 | |||
75 | #include <sys/param.h> | 75 | #include <sys/param.h> | |
76 | #include <sys/systm.h> | 76 | #include <sys/systm.h> | |
77 | #include <sys/bus.h> | 77 | #include <sys/bus.h> | |
78 | #include <sys/cpu.h> | 78 | #include <sys/cpu.h> | |
79 | #include <sys/device.h> | 79 | #include <sys/device.h> | |
80 | 80 | |||
81 | #include <machine/nexus.h> | 81 | #include <machine/nexus.h> | |
82 | #include <machine/sgmap.h> | 82 | #include <machine/sgmap.h> | |
83 | 83 | |||
84 | #include <dev/qbus/ubavar.h> | 84 | #include <dev/qbus/ubavar.h> | |
@@ -88,28 +88,28 @@ __KERNEL_RCSID(0, "$NetBSD: uba_ubi.c,v | @@ -88,28 +88,28 @@ __KERNEL_RCSID(0, "$NetBSD: uba_ubi.c,v | |||
88 | #include "locators.h" | 88 | #include "locators.h" | |
89 | 89 | |||
90 | /* Some UBI-specific defines */ | 90 | /* Some UBI-specific defines */ | |
91 | #define UBASIZE ((UBAPAGES + UBAIOPAGES) * VAX_NBPG) | 91 | #define UBASIZE ((UBAPAGES + UBAIOPAGES) * VAX_NBPG) | |
92 | #define UMEM730 (0xfc0000) | 92 | #define UMEM730 (0xfc0000) | |
93 | #define UIOPAGE (UMEM730 + (UBAPAGES * VAX_NBPG)) | 93 | #define UIOPAGE (UMEM730 + (UBAPAGES * VAX_NBPG)) | |
94 | 94 | |||
95 | /* | 95 | /* | |
96 | * The DW780, DW750 and DW730 are quite similar to their function from | 96 | * The DW780, DW750 and DW730 are quite similar to their function from | |
97 | * a programmers point of view. Differencies are number of BDP's | 97 | * a programmers point of view. Differencies are number of BDP's | |
98 | * and bus status/command registers, the latter are (partly) IPR's | 98 | * and bus status/command registers, the latter are (partly) IPR's | |
99 | * on 750. | 99 | * on 750. | |
100 | */ | 100 | */ | |
101 | static int dw730_match(struct device *, struct cfdata *, void *); | 101 | static int dw730_match(device_t, cfdata_t, void *); | |
102 | static void dw730_attach(struct device *, struct device *, void *); | 102 | static void dw730_attach(device_t, device_t, void *); | |
103 | static void dw730_init(struct uba_softc*); | 103 | static void dw730_init(struct uba_softc*); | |
104 | #ifdef notyet | 104 | #ifdef notyet | |
105 | static void dw730_purge(struct uba_softc *, int); | 105 | static void dw730_purge(struct uba_softc *, int); | |
106 | #endif | 106 | #endif | |
107 | 107 | |||
108 | CFATTACH_DECL_NEW(uba_ubi, sizeof(struct uba_vsoftc), | 108 | CFATTACH_DECL_NEW(uba_ubi, sizeof(struct uba_vsoftc), | |
109 | dw730_match, dw730_attach, NULL, NULL); | 109 | dw730_match, dw730_attach, NULL, NULL); | |
110 | 110 | |||
111 | extern struct vax_bus_space vax_mem_bus_space; | 111 | extern struct vax_bus_space vax_mem_bus_space; | |
112 | 112 | |||
113 | int | 113 | int | |
114 | dw730_match(device_t parent, cfdata_t cf, void *aux) | 114 | dw730_match(device_t parent, cfdata_t cf, void *aux) | |
115 | { | 115 | { |
--- src/sys/arch/vax/vax/ka6400.c 2010/12/14 23:44:49 1.15
+++ src/sys/arch/vax/vax/ka6400.c 2011/06/05 16:59:21 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ka6400.c,v 1.15 2010/12/14 23:44:49 matt Exp $ */ | 1 | /* $NetBSD: ka6400.c,v 1.16 2011/06/05 16:59:21 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. | 4 | * Copyright (c) 2000 Ludd, University of Lule}, Sweden. 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 | |
@@ -30,27 +30,27 @@ | @@ -30,27 +30,27 @@ | |||
30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | /* | 33 | /* | |
34 | * KA6400 specific CPU code. | 34 | * KA6400 specific CPU code. | |
35 | */ | 35 | */ | |
36 | /* | 36 | /* | |
37 | * TODO: | 37 | * TODO: | |
38 | * - Machine check code | 38 | * - Machine check code | |
39 | * - Vector processor code | 39 | * - Vector processor code | |
40 | */ | 40 | */ | |
41 | 41 | |||
42 | #include <sys/cdefs.h> | 42 | #include <sys/cdefs.h> | |
43 | __KERNEL_RCSID(0, "$NetBSD: ka6400.c,v 1.15 2010/12/14 23:44:49 matt Exp $"); | 43 | __KERNEL_RCSID(0, "$NetBSD: ka6400.c,v 1.16 2011/06/05 16:59:21 matt Exp $"); | |
44 | 44 | |||
45 | #include "opt_multiprocessor.h" | 45 | #include "opt_multiprocessor.h" | |
46 | 46 | |||
47 | #include <sys/param.h> | 47 | #include <sys/param.h> | |
48 | #include <sys/systm.h> | 48 | #include <sys/systm.h> | |
49 | #include <sys/bus.h> | 49 | #include <sys/bus.h> | |
50 | #include <sys/cpu.h> | 50 | #include <sys/cpu.h> | |
51 | #include <sys/device.h> | 51 | #include <sys/device.h> | |
52 | #include <sys/kernel.h> | 52 | #include <sys/kernel.h> | |
53 | #include <sys/time.h> | 53 | #include <sys/time.h> | |
54 | 54 | |||
55 | #include <machine/ka670.h> | 55 | #include <machine/ka670.h> | |
56 | #include <machine/nexus.h> | 56 | #include <machine/nexus.h> | |
@@ -184,27 +184,27 @@ ka6400_conf(void) | @@ -184,27 +184,27 @@ ka6400_conf(void) | |||
184 | #define MS62_CTL1 20 | 184 | #define MS62_CTL1 20 | |
185 | #define MS62_ECCERR 24 | 185 | #define MS62_ECCERR 24 | |
186 | #define MS62_ECCEA 28 | 186 | #define MS62_ECCEA 28 | |
187 | #define MS62_ILK0 32 | 187 | #define MS62_ILK0 32 | |
188 | #define MS62_ILK1 36 | 188 | #define MS62_ILK1 36 | |
189 | #define MS62_ILK2 40 | 189 | #define MS62_ILK2 40 | |
190 | #define MS62_ILK3 44 | 190 | #define MS62_ILK3 44 | |
191 | #define MS62_CTL2 48 | 191 | #define MS62_CTL2 48 | |
192 | 192 | |||
193 | static int ms6400_match(device_t , cfdata_t, void *); | 193 | static int ms6400_match(device_t , cfdata_t, void *); | |
194 | static void ms6400_attach(device_t , device_t , void*); | 194 | static void ms6400_attach(device_t , device_t , void*); | |
195 | 195 | |||
196 | struct mem_xmi_softc { | 196 | struct mem_xmi_softc { | |
197 | struct device *sc_dev; | 197 | device_t sc_dev; | |
198 | bus_space_tag_t sc_iot; | 198 | bus_space_tag_t sc_iot; | |
199 | bus_space_handle_t sc_ioh; | 199 | bus_space_handle_t sc_ioh; | |
200 | }; | 200 | }; | |
201 | 201 | |||
202 | CFATTACH_DECL_NEW(mem_xmi, sizeof(struct mem_xmi_softc), | 202 | CFATTACH_DECL_NEW(mem_xmi, sizeof(struct mem_xmi_softc), | |
203 | ms6400_match, ms6400_attach, NULL, NULL); | 203 | ms6400_match, ms6400_attach, NULL, NULL); | |
204 | 204 | |||
205 | static int | 205 | static int | |
206 | ms6400_match(device_t parent, cfdata_t cf, void *aux) | 206 | ms6400_match(device_t parent, cfdata_t cf, void *aux) | |
207 | { | 207 | { | |
208 | struct xmi_attach_args * const xa = aux; | 208 | struct xmi_attach_args * const xa = aux; | |
209 | 209 | |||
210 | if (bus_space_read_2(xa->xa_iot, xa->xa_ioh, XMI_TYPE) != XMIDT_MS62) | 210 | if (bus_space_read_2(xa->xa_iot, xa->xa_ioh, XMI_TYPE) != XMIDT_MS62) |
--- src/sys/arch/vax/vax/ka88.c 2010/12/14 23:44:49 1.15
+++ src/sys/arch/vax/vax/ka88.c 2011/06/05 16:59:21 1.16
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ka88.c,v 1.15 2010/12/14 23:44:49 matt Exp $ */ | 1 | /* $NetBSD: ka88.c,v 1.16 2011/06/05 16:59:21 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. | 4 | * Copyright (c) 2000 Ludd, University of Lule}, Sweden. 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 | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | /* | 33 | /* | |
34 | * KA88 specific CPU code. | 34 | * KA88 specific CPU code. | |
35 | */ | 35 | */ | |
36 | /* | 36 | /* | |
37 | * TODO: | 37 | * TODO: | |
38 | * - Machine check code | 38 | * - Machine check code | |
39 | */ | 39 | */ | |
40 | 40 | |||
41 | #include <sys/cdefs.h> | 41 | #include <sys/cdefs.h> | |
42 | __KERNEL_RCSID(0, "$NetBSD: ka88.c,v 1.15 2010/12/14 23:44:49 matt Exp $"); | 42 | __KERNEL_RCSID(0, "$NetBSD: ka88.c,v 1.16 2011/06/05 16:59:21 matt Exp $"); | |
43 | 43 | |||
44 | #include "opt_multiprocessor.h" | 44 | #include "opt_multiprocessor.h" | |
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/bus.h> | 48 | #include <sys/bus.h> | |
49 | #include <sys/cpu.h> | 49 | #include <sys/cpu.h> | |
50 | #include <sys/device.h> | 50 | #include <sys/device.h> | |
51 | #include <sys/kernel.h> | 51 | #include <sys/kernel.h> | |
52 | #include <sys/malloc.h> | 52 | #include <sys/malloc.h> | |
53 | #include <sys/lwp.h> | 53 | #include <sys/lwp.h> | |
54 | 54 | |||
55 | #include <machine/nexus.h> | 55 | #include <machine/nexus.h> | |
@@ -155,27 +155,27 @@ ka88_cpu_attach(device_t parent, device_ | @@ -155,27 +155,27 @@ ka88_cpu_attach(device_t parent, device_ | |||
155 | return; | 155 | return; | |
156 | } | 156 | } | |
157 | ci = curcpu(); | 157 | ci = curcpu(); | |
158 | self->dv_private = ci; | 158 | self->dv_private = ci; | |
159 | ci->ci_dev = self; | 159 | ci->ci_dev = self; | |
160 | ci->ci_cpuid = device_unit(self); | 160 | ci->ci_cpuid = device_unit(self); | |
161 | ci->ci_slotid = na->na_slot; | 161 | ci->ci_slotid = na->na_slot; | |
162 | } | 162 | } | |
163 | 163 | |||
164 | CFATTACH_DECL_NEW(cpu_nmi, 0, | 164 | CFATTACH_DECL_NEW(cpu_nmi, 0, | |
165 | ka88_cpu_match, ka88_cpu_attach, NULL, NULL); | 165 | ka88_cpu_match, ka88_cpu_attach, NULL, NULL); | |
166 | 166 | |||
167 | struct mem_nmi_softc { | 167 | struct mem_nmi_softc { | |
168 | struct device *sc_dev; | 168 | device_t sc_dev; | |
169 | bus_space_tag_t sc_iot; | 169 | bus_space_tag_t sc_iot; | |
170 | bus_space_handle_t sc_ioh; | 170 | bus_space_handle_t sc_ioh; | |
171 | }; | 171 | }; | |
172 | 172 | |||
173 | static int | 173 | static int | |
174 | ms88_match(device_t parent, cfdata_t cf, void *aux) | 174 | ms88_match(device_t parent, cfdata_t cf, void *aux) | |
175 | { | 175 | { | |
176 | struct nmi_attach_args * const na = aux; | 176 | struct nmi_attach_args * const na = aux; | |
177 | 177 | |||
178 | if (cf->cf_loc[NMICF_SLOT] != NMICF_SLOT_DEFAULT && | 178 | if (cf->cf_loc[NMICF_SLOT] != NMICF_SLOT_DEFAULT && | |
179 | cf->cf_loc[NMICF_SLOT] != na->na_slot) | 179 | cf->cf_loc[NMICF_SLOT] != na->na_slot) | |
180 | return 0; | 180 | return 0; | |
181 | if (na->na_slot != 10) | 181 | if (na->na_slot != 10) |
--- src/sys/arch/vax/vax/ka730.c 2010/12/14 23:44:49 1.2
+++ src/sys/arch/vax/vax/ka730.c 2011/06/05 16:59:21 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ka730.c,v 1.2 2010/12/14 23:44:49 matt Exp $ */ | 1 | /* $NetBSD: ka730.c,v 1.3 2011/06/05 16:59:21 matt Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 1982, 1986, 1988 The Regents of the University of California. | 3 | * Copyright (c) 1982, 1986, 1988 The Regents of the University of California. | |
4 | * All rights reserved. | 4 | * 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. Neither the name of the University nor the names of its contributors | 14 | * 3. Neither the name of the University nor the names of its contributors | |
@@ -58,27 +58,27 @@ | @@ -58,27 +58,27 @@ | |||
58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 58 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | 59 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 60 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 61 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 62 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 63 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
64 | * SUCH DAMAGE. | 64 | * SUCH DAMAGE. | |
65 | * | 65 | * | |
66 | * @(#)ka730.c 7.4 (Berkeley) 5/9/91 | 66 | * @(#)ka730.c 7.4 (Berkeley) 5/9/91 | |
67 | * @(#)autoconf.c 7.20 (Berkeley) 5/9/91 | 67 | * @(#)autoconf.c 7.20 (Berkeley) 5/9/91 | |
68 | */ | 68 | */ | |
69 | 69 | |||
70 | #include <sys/cdefs.h> | 70 | #include <sys/cdefs.h> | |
71 | __KERNEL_RCSID(0, "$NetBSD: ka730.c,v 1.2 2010/12/14 23:44:49 matt Exp $"); | 71 | __KERNEL_RCSID(0, "$NetBSD: ka730.c,v 1.3 2011/06/05 16:59:21 matt Exp $"); | |
72 | 72 | |||
73 | #include <sys/param.h> | 73 | #include <sys/param.h> | |
74 | #include <sys/systm.h> | 74 | #include <sys/systm.h> | |
75 | #include <sys/bus.h> | 75 | #include <sys/bus.h> | |
76 | #include <sys/cpu.h> | 76 | #include <sys/cpu.h> | |
77 | #include <sys/device.h> | 77 | #include <sys/device.h> | |
78 | 78 | |||
79 | #include <machine/ka730.h> | 79 | #include <machine/ka730.h> | |
80 | #include <machine/clock.h> | 80 | #include <machine/clock.h> | |
81 | #include <machine/sid.h> | 81 | #include <machine/sid.h> | |
82 | 82 | |||
83 | #include <vax/vax/gencons.h> | 83 | #include <vax/vax/gencons.h> | |
84 | 84 | |||
@@ -110,55 +110,55 @@ struct cpu_dep ka730_calls = { | @@ -110,55 +110,55 @@ struct cpu_dep ka730_calls = { | |||
110 | void | 110 | void | |
111 | ka730_conf() | 111 | ka730_conf() | |
112 | { | 112 | { | |
113 | /* Call ctuattach() here so it can setup its vectors. */ | 113 | /* Call ctuattach() here so it can setup its vectors. */ | |
114 | ctuattach(); | 114 | ctuattach(); | |
115 | } | 115 | } | |
116 | 116 | |||
117 | void | 117 | void | |
118 | ka730_attach_cpu(device_t self) | 118 | ka730_attach_cpu(device_t self) | |
119 | { | 119 | { | |
120 | aprint_normal("KA730, ucode rev %d\n", V730UCODE(vax_cpudata)); | 120 | aprint_normal("KA730, ucode rev %d\n", V730UCODE(vax_cpudata)); | |
121 | } | 121 | } | |
122 | 122 | |||
123 | static void ka730_memenable(struct device *, struct device *, void *); | 123 | static void ka730_memenable(device_t, device_t, void *); | |
124 | static int ka730_memmatch(struct device *, struct cfdata *, void *); | 124 | static int ka730_memmatch(device_t, cfdata_t, void *); | |
125 | 125 | |||
126 | CFATTACH_DECL(mem_ubi, sizeof(struct device), | 126 | CFATTACH_DECL_NEW(mem_ubi, 0, | |
127 | ka730_memmatch, ka730_memenable, NULL, NULL); | 127 | ka730_memmatch, ka730_memenable, NULL, NULL); | |
128 | 128 | |||
129 | int | 129 | int | |
130 | ka730_memmatch(struct device *parent, struct cfdata *cf, void *aux) | 130 | ka730_memmatch(device_t parent, cfdata_t cf, void *aux) | |
131 | { | 131 | { | |
132 | struct sbi_attach_args *sa = (struct sbi_attach_args *)aux; | 132 | struct sbi_attach_args *sa = aux; | |
133 | 133 | |||
134 | if (cf->cf_loc[UBICF_TR] != sa->sa_nexnum && | 134 | if (cf->cf_loc[UBICF_TR] != sa->sa_nexnum && | |
135 | cf->cf_loc[UBICF_TR] > UBICF_TR_DEFAULT) | 135 | cf->cf_loc[UBICF_TR] > UBICF_TR_DEFAULT) | |
136 | return 0; | 136 | return 0; | |
137 | 137 | |||
138 | if (sa->sa_type != NEX_MEM16) | 138 | if (sa->sa_type != NEX_MEM16) | |
139 | return 0; | 139 | return 0; | |
140 | 140 | |||
141 | return 1; | 141 | return 1; | |
142 | } | 142 | } | |
143 | 143 | |||
144 | struct mcr730 { | 144 | struct mcr730 { | |
145 | int mc_addr; /* address and syndrome */ | 145 | int mc_addr; /* address and syndrome */ | |
146 | int mc_err; /* error bits */ | 146 | int mc_err; /* error bits */ | |
147 | }; | 147 | }; | |
148 | 148 | |||
149 | /* enable crd interrupts */ | 149 | /* enable crd interrupts */ | |
150 | void | 150 | void | |
151 | ka730_memenable(struct device *parent, struct device *self, void *aux) | 151 | ka730_memenable(device_t parent, device_t self, void *aux) | |
152 | { | 152 | { | |
153 | } | 153 | } | |
154 | 154 | |||
155 | /* log crd errors */ | 155 | /* log crd errors */ | |
156 | void | 156 | void | |
157 | ka730_memerr() | 157 | ka730_memerr() | |
158 | { | 158 | { | |
159 | } | 159 | } | |
160 | 160 | |||
161 | #define NMC730 12 | 161 | #define NMC730 12 | |
162 | const char *mc730[]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13", | 162 | const char *mc730[]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13", | |
163 | "14","15"}; | 163 | "14","15"}; | |
164 | 164 |
--- src/sys/arch/vax/vax/ka820.c 2010/12/14 23:44:49 1.53
+++ src/sys/arch/vax/vax/ka820.c 2011/06/05 16:59:21 1.54
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ka820.c,v 1.53 2010/12/14 23:44:49 matt Exp $ */ | 1 | /* $NetBSD: ka820.c,v 1.54 2011/06/05 16:59:21 matt Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 1988 Regents of the University of California. | 3 | * Copyright (c) 1988 Regents of the University of California. | |
4 | * All rights reserved. | 4 | * All rights reserved. | |
5 | * | 5 | * | |
6 | * This code is derived from software contributed to Berkeley by | 6 | * This code is derived from software contributed to Berkeley by | |
7 | * Chris Torek. | 7 | * Chris Torek. | |
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 | |
@@ -29,27 +29,27 @@ | @@ -29,27 +29,27 @@ | |||
29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
31 | * SUCH DAMAGE. | 31 | * SUCH DAMAGE. | |
32 | * | 32 | * | |
33 | * @(#)ka820.c 7.4 (Berkeley) 12/16/90 | 33 | * @(#)ka820.c 7.4 (Berkeley) 12/16/90 | |
34 | */ | 34 | */ | |
35 | 35 | |||
36 | /* | 36 | /* | |
37 | * KA820 specific CPU code. (Note that the VAX8200 uses a KA820, not | 37 | * KA820 specific CPU code. (Note that the VAX8200 uses a KA820, not | |
38 | * a KA8200. Sigh.) | 38 | * a KA8200. Sigh.) | |
39 | */ | 39 | */ | |
40 | 40 | |||
41 | #include <sys/cdefs.h> | 41 | #include <sys/cdefs.h> | |
42 | __KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.53 2010/12/14 23:44:49 matt Exp $"); | 42 | __KERNEL_RCSID(0, "$NetBSD: ka820.c,v 1.54 2011/06/05 16:59:21 matt Exp $"); | |
43 | 43 | |||
44 | #include "opt_multiprocessor.h" | 44 | #include "opt_multiprocessor.h" | |
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/bus.h> | 48 | #include <sys/bus.h> | |
49 | #include <sys/cpu.h> | 49 | #include <sys/cpu.h> | |
50 | #include <sys/device.h> | 50 | #include <sys/device.h> | |
51 | #include <sys/kernel.h> | 51 | #include <sys/kernel.h> | |
52 | #include <sys/proc.h> | 52 | #include <sys/proc.h> | |
53 | 53 | |||
54 | #include <machine/ka820.h> | 54 | #include <machine/ka820.h> | |
55 | #include <machine/nexus.h> | 55 | #include <machine/nexus.h> | |
@@ -269,27 +269,27 @@ struct ms820regs { | @@ -269,27 +269,27 @@ struct ms820regs { | |||
269 | #define MS2_RDSERR 0x80000000 /* rds error (rw) */ | 269 | #define MS2_RDSERR 0x80000000 /* rds error (rw) */ | |
270 | #define MS2_HIERR 0x40000000 /* high error rate (rw) */ | 270 | #define MS2_HIERR 0x40000000 /* high error rate (rw) */ | |
271 | #define MS2_CRDERR 0x20000000 /* crd error (rw) */ | 271 | #define MS2_CRDERR 0x20000000 /* crd error (rw) */ | |
272 | #define MS2_ADRSERR 0x10000000 /* rds due to addr par err (rw) */ | 272 | #define MS2_ADRSERR 0x10000000 /* rds due to addr par err (rw) */ | |
273 | #define MS2_MBZ 0x0f000080 /* zero */ | 273 | #define MS2_MBZ 0x0f000080 /* zero */ | |
274 | #define MS2_ADDR 0x00fffe00 /* address in error (relative) (ro) */ | 274 | #define MS2_ADDR 0x00fffe00 /* address in error (relative) (ro) */ | |
275 | #define MS2_INTLVADDR 0x00000100 /* error was in bank 1 (ro) */ | 275 | #define MS2_INTLVADDR 0x00000100 /* error was in bank 1 (ro) */ | |
276 | #define MS2_SYN 0x0000007f /* error syndrome (ro, rw diag) */ | 276 | #define MS2_SYN 0x0000007f /* error syndrome (ro, rw diag) */ | |
277 | 277 | |||
278 | static int ms820_match(device_t, cfdata_t, void *); | 278 | static int ms820_match(device_t, cfdata_t, void *); | |
279 | static void ms820_attach(device_t, device_t, void*); | 279 | static void ms820_attach(device_t, device_t, void*); | |
280 | 280 | |||
281 | struct mem_bi_softc { | 281 | struct mem_bi_softc { | |
282 | struct device *sc_dev; | 282 | device_t sc_dev; | |
283 | bus_space_tag_t sc_iot; | 283 | bus_space_tag_t sc_iot; | |
284 | bus_space_handle_t sc_ioh; | 284 | bus_space_handle_t sc_ioh; | |
285 | }; | 285 | }; | |
286 | 286 | |||
287 | CFATTACH_DECL_NEW(mem_bi, sizeof(struct mem_bi_softc), | 287 | CFATTACH_DECL_NEW(mem_bi, sizeof(struct mem_bi_softc), | |
288 | ms820_match, ms820_attach, NULL, NULL); | 288 | ms820_match, ms820_attach, NULL, NULL); | |
289 | 289 | |||
290 | static int | 290 | static int | |
291 | ms820_match(device_t parent, cfdata_t cf, void *aux) | 291 | ms820_match(device_t parent, cfdata_t cf, void *aux) | |
292 | { | 292 | { | |
293 | struct bi_attach_args * const ba = aux; | 293 | struct bi_attach_args * const ba = aux; | |
294 | 294 | |||
295 | if (bus_space_read_2(ba->ba_iot, ba->ba_ioh, BIREG_DTYPE) != BIDT_MS820) | 295 | if (bus_space_read_2(ba->ba_iot, ba->ba_ioh, BIREG_DTYPE) != BIDT_MS820) |
--- src/sys/arch/vax/vax/multicpu.c 2010/12/14 23:44:49 1.31
+++ src/sys/arch/vax/vax/multicpu.c 2011/06/05 16:59:21 1.32
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: multicpu.c,v 1.31 2010/12/14 23:44:49 matt Exp $ */ | 1 | /* $NetBSD: multicpu.c,v 1.32 2011/06/05 16:59:21 matt Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2000 Ludd, University of Lule}, Sweden. All rights reserved. | 4 | * Copyright (c) 2000 Ludd, University of Lule}, Sweden. 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 | |
@@ -25,49 +25,49 @@ | @@ -25,49 +25,49 @@ | |||
25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | /* | 33 | /* | |
34 | * CPU-type independent code to spin up other VAX CPU's. | 34 | * CPU-type independent code to spin up other VAX CPU's. | |
35 | */ | 35 | */ | |
36 | 36 | |||
37 | #include <sys/cdefs.h> | 37 | #include <sys/cdefs.h> | |
38 | __KERNEL_RCSID(0, "$NetBSD: multicpu.c,v 1.31 2010/12/14 23:44:49 matt Exp $"); | 38 | __KERNEL_RCSID(0, "$NetBSD: multicpu.c,v 1.32 2011/06/05 16:59:21 matt Exp $"); | |
39 | 39 | |||
40 | #include "opt_multiprocessor.h" | 40 | #include "opt_multiprocessor.h" | |
41 | 41 | |||
42 | #include <sys/param.h> | 42 | #include <sys/param.h> | |
43 | #include <sys/cpu.h> | 43 | #include <sys/cpu.h> | |
44 | #include <sys/device.h> | 44 | #include <sys/device.h> | |
45 | #include <sys/malloc.h> | 45 | #include <sys/malloc.h> | |
46 | #include <sys/proc.h> | 46 | #include <sys/proc.h> | |
47 | #include <sys/xcall.h> | 47 | #include <sys/xcall.h> | |
48 | 48 | |||
49 | #include <uvm/uvm_extern.h> | 49 | #include <uvm/uvm_extern.h> | |
50 | 50 | |||
51 | #include <vax/vax/gencons.h> | 51 | #include <vax/vax/gencons.h> | |
52 | 52 | |||
53 | #include "ioconf.h" | 53 | #include "ioconf.h" | |
54 | 54 | |||
55 | const struct cpu_mp_dep *mp_dep_call; | 55 | const struct cpu_mp_dep *mp_dep_call; | |
56 | 56 | |||
57 | struct cpuq { | 57 | struct cpuq { | |
58 | SIMPLEQ_ENTRY(cpuq) cq_q; | 58 | SIMPLEQ_ENTRY(cpuq) cq_q; | |
59 | struct cpu_info *cq_ci; | 59 | struct cpu_info *cq_ci; | |
60 | struct device *cq_dev; | 60 | device_t cq_dev; | |
61 | }; | 61 | }; | |
62 | 62 | |||
63 | SIMPLEQ_HEAD(, cpuq) cpuq = SIMPLEQ_HEAD_INITIALIZER(cpuq); | 63 | SIMPLEQ_HEAD(, cpuq) cpuq = SIMPLEQ_HEAD_INITIALIZER(cpuq); | |
64 | 64 | |||
65 | extern long avail_start, avail_end; | 65 | extern long avail_start, avail_end; | |
66 | struct cpu_info_qh cpus = SIMPLEQ_HEAD_INITIALIZER(cpus); | 66 | struct cpu_info_qh cpus = SIMPLEQ_HEAD_INITIALIZER(cpus); | |
67 | 67 | |||
68 | void | 68 | void | |
69 | cpu_boot_secondary_processors(void) | 69 | cpu_boot_secondary_processors(void) | |
70 | { | 70 | { | |
71 | struct cpuq *q; | 71 | struct cpuq *q; | |
72 | 72 | |||
73 | while ((q = SIMPLEQ_FIRST(&cpuq))) { | 73 | while ((q = SIMPLEQ_FIRST(&cpuq))) { |
--- src/sys/arch/vax/vax/ubi.c 2010/12/14 23:44:50 1.3
+++ src/sys/arch/vax/vax/ubi.c 2011/06/05 16:59:21 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: ubi.c,v 1.3 2010/12/14 23:44:50 matt Exp $ */ | 1 | /* $NetBSD: ubi.c,v 1.4 2011/06/05 16:59:21 matt Exp $ */ | |
2 | /* | 2 | /* | |
3 | * Copyright (c) 1999 Ludd, University of Lule}, Sweden. | 3 | * Copyright (c) 1999 Ludd, University of Lule}, Sweden. | |
4 | * All rights reserved. | 4 | * 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 | |
@@ -21,68 +21,68 @@ | @@ -21,68 +21,68 @@ | |||
21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | |
22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | 22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | |
23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | 23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | |
24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | 24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | |
25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | |
26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | |
30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: ubi.c,v 1.3 2010/12/14 23:44:50 matt Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: ubi.c,v 1.4 2011/06/05 16:59:21 matt Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/systm.h> | 37 | #include <sys/systm.h> | |
38 | #include <sys/bus.h> | 38 | #include <sys/bus.h> | |
39 | #include <sys/cpu.h> | 39 | #include <sys/cpu.h> | |
40 | #include <sys/device.h> | 40 | #include <sys/device.h> | |
41 | 41 | |||
42 | #include <machine/nexus.h> | 42 | #include <machine/nexus.h> | |
43 | #include <machine/sid.h> | 43 | #include <machine/sid.h> | |
44 | #include <machine/ka730.h> | 44 | #include <machine/ka730.h> | |
45 | 45 | |||
46 | static int ubi_print(void *, const char *); | 46 | static int ubi_print(void *, const char *); | |
47 | static int ubi_match(struct device *, struct cfdata *, void *); | 47 | static int ubi_match(device_t, cfdata_t, void *); | |
48 | static void ubi_attach(struct device *, struct device *, void*); | 48 | static void ubi_attach(device_t, device_t, void*); | |
49 | 49 | |||
50 | CFATTACH_DECL_NEW(ubi, sizeof(struct device), | 50 | CFATTACH_DECL_NEW(ubi, 0, | |
51 | ubi_match, ubi_attach, NULL, NULL); | 51 | ubi_match, ubi_attach, NULL, NULL); | |
52 | 52 | |||
53 | int | 53 | int | |
54 | ubi_print(void *aux, const char *name) | 54 | ubi_print(void *aux, const char *name) | |
55 | { | 55 | { | |
56 | struct sbi_attach_args *sa = (struct sbi_attach_args *)aux; | 56 | struct sbi_attach_args *sa = (struct sbi_attach_args *)aux; | |
57 | 57 | |||
58 | if (name) | 58 | if (name) | |
59 | aprint_normal("unknown device 0x%x at %s", sa->sa_type, name); | 59 | aprint_normal("unknown device 0x%x at %s", sa->sa_type, name); | |
60 | 60 | |||
61 | aprint_normal(" tr%d", sa->sa_nexnum); | 61 | aprint_normal(" tr%d", sa->sa_nexnum); | |
62 | return (UNCONF); | 62 | return (UNCONF); | |
63 | } | 63 | } | |
64 | 64 | |||
65 | 65 | |||
66 | int | 66 | int | |
67 | ubi_match(struct device *parent, struct cfdata *cf, void *aux) | 67 | ubi_match(device_t parent, cfdata_t cf, void *aux) | |
68 | { | 68 | { | |
69 | if (vax_bustype == VAX_UNIBUS) | 69 | if (vax_bustype == VAX_UNIBUS) | |
70 | return 1; | 70 | return 1; | |
71 | return 0; | 71 | return 0; | |
72 | } | 72 | } | |
73 | 73 | |||
74 | void | 74 | void | |
75 | ubi_attach(struct device *parent, struct device *self, void *aux) | 75 | ubi_attach(device_t parent, device_t self, void *aux) | |
76 | { | 76 | { | |
77 | struct sbi_attach_args sa; | 77 | struct sbi_attach_args sa; | |
78 | 78 | |||
79 | printf("\n"); | 79 | printf("\n"); | |
80 | 80 | |||
81 | sa.sa_base = NEX730; | 81 | sa.sa_base = NEX730; | |
82 | 82 | |||
83 | #define NEXPAGES (sizeof(struct nexus) / VAX_NBPG) | 83 | #define NEXPAGES (sizeof(struct nexus) / VAX_NBPG) | |
84 | 84 | |||
85 | #if 0 | 85 | #if 0 | |
86 | /* | 86 | /* | |
87 | * Probe for memory, can be in the first 4 slots. | 87 | * Probe for memory, can be in the first 4 slots. | |
88 | */ | 88 | */ |