s/struct device/device_t/. s/struct cfdata/cfdata_t/. Remove unused <sys/bus.h> The macro CFATTACH_DECL_NEW() was call with size 0 temporarily.diff -r1.5 -r1.6 src/sys/arch/ia64/ia64/cpu.c
(kiyohara)
--- src/sys/arch/ia64/ia64/cpu.c 2009/07/20 04:41:37 1.5
+++ src/sys/arch/ia64/ia64/cpu.c 2009/07/20 06:12:41 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: cpu.c,v 1.5 2009/07/20 04:41:37 kiyohara Exp $ */ | 1 | /* $NetBSD: cpu.c,v 1.6 2009/07/20 06:12:41 kiyohara Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2006 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2006 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * | 7 | * | |
8 | * Author: | 8 | * Author: | |
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,53 +20,53 @@ | @@ -20,53 +20,53 @@ | |||
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: cpu.c,v 1.5 2009/07/20 04:41:37 kiyohara Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.6 2009/07/20 06:12:41 kiyohara Exp $"); | |
34 | 34 | |||
35 | #include <sys/param.h> | 35 | #include <sys/param.h> | |
36 | #include <sys/proc.h> | 36 | #include <sys/proc.h> | |
37 | #include <sys/user.h> | 37 | #include <sys/user.h> | |
38 | #include <sys/systm.h> | 38 | #include <sys/systm.h> | |
39 | #include <sys/device.h> | 39 | #include <sys/device.h> | |
40 | #include <sys/malloc.h> | 40 | #include <sys/malloc.h> | |
41 | 41 | |||
42 | struct cpu_info cpu_info_primary; | 42 | struct cpu_info cpu_info_primary; | |
43 | 43 | |||
44 | int cpu_match(struct device *, struct cfdata *, void *); | 44 | int cpu_match(device_t, cfdata_t, void *); | |
45 | void cpu_attach(struct device *, struct device *, void *); | 45 | void cpu_attach(device_t, device_t, void *); | |
46 | 46 | |||
47 | struct cpu_softc { | 47 | struct cpu_softc { | |
48 | struct device sc_dev; /* device tree glue */ | 48 | device_t sc_dev; /* device tree glue */ | |
49 | struct cpu_info *sc_info; /* pointer to CPU info */ | 49 | struct cpu_info *sc_info; /* pointer to CPU info */ | |
50 | }; | 50 | }; | |
51 | 51 | |||
52 | CFATTACH_DECL(cpu, sizeof(struct cpu_softc), | 52 | CFATTACH_DECL_NEW(cpu, sizeof(struct cpu_softc), | |
53 | cpu_match, cpu_attach, NULL, NULL); | 53 | cpu_match, cpu_attach, NULL, NULL); | |
54 | 54 | |||
55 | 55 | |||
56 | int | 56 | int | |
57 | cpu_match(struct device *parent, struct cfdata *match, void *aux) | 57 | cpu_match(device_t parent, cfdata_t match, void *aux) | |
58 | { | 58 | { | |
59 | return 1; | 59 | return 1; | |
60 | } | 60 | } | |
61 | 61 | |||
62 | void | 62 | void | |
63 | cpu_attach(struct device *parent, struct device *self, void *aux) | 63 | cpu_attach(device_t parent, device_t self, void *aux) | |
64 | { | 64 | { | |
65 | 65 | |||
66 | #if 0 /* not yet */ | 66 | #if 0 /* not yet */ | |
67 | ci->ci_cpuid = id; | 67 | ci->ci_cpuid = id; | |
68 | ci->ci_intrdepth = -1; /* need ? */ | 68 | ci->ci_intrdepth = -1; /* need ? */ | |
69 | ci->ci_dev = self; | 69 | ci->ci_dev = self; | |
70 | #endif | 70 | #endif | |
71 | return; | 71 | return; | |
72 | } | 72 | } |
--- src/sys/arch/ia64/ia64/mainbus.c 2009/07/20 05:10:49 1.5
+++ src/sys/arch/ia64/ia64/mainbus.c 2009/07/20 06:12:41 1.6
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: mainbus.c,v 1.5 2009/07/20 05:10:49 kiyohara Exp $ */ | 1 | /* $NetBSD: mainbus.c,v 1.6 2009/07/20 06:12:41 kiyohara Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2006 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2006 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Author: | 7 | * Author: | |
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 | |
@@ -19,51 +19,50 @@ | @@ -19,51 +19,50 @@ | |||
19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 19 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 20 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 22 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 23 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 24 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 25 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 26 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 27 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
28 | * POSSIBILITY OF SUCH DAMAGE. | 28 | * POSSIBILITY OF SUCH DAMAGE. | |
29 | */ | 29 | */ | |
30 | 30 | |||
31 | #include <sys/cdefs.h> | 31 | #include <sys/cdefs.h> | |
32 | __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.5 2009/07/20 05:10:49 kiyohara Exp $"); | 32 | __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.6 2009/07/20 06:12:41 kiyohara Exp $"); | |
33 | 33 | |||
34 | #include "acpi.h" | 34 | #include "acpi.h" | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/device.h> | 37 | #include <sys/device.h> | |
38 | #include <sys/errno.h> | 38 | #include <sys/errno.h> | |
39 | 39 | |||
40 | #include <machine/bus.h> | |||
41 | ||||
42 | #include <dev/acpi/acpivar.h> | 40 | #include <dev/acpi/acpivar.h> | |
43 | 41 | |||
44 | 42 | |||
45 | static int mainbus_match(struct device *, struct cfdata *, void *); | 43 | static int mainbus_match(device_t, cfdata_t, void *); | |
46 | static void mainbus_attach(struct device *, struct device *, void *); | 44 | static void mainbus_attach(device_t, device_t, void *); | |
47 | 45 | |||
48 | CFATTACH_DECL_NEW(mainbus, sizeof(struct device), | 46 | CFATTACH_DECL_NEW(mainbus, | |
47 | /*sizeof(struct device): XXXXX It doesn't use it now*/ 0, | |||
49 | mainbus_match, mainbus_attach, NULL, NULL); | 48 | mainbus_match, mainbus_attach, NULL, NULL); | |
50 | 49 | |||
51 | 50 | |||
52 | /* | 51 | /* | |
53 | * Probe for the mainbus; always succeeds. | 52 | * Probe for the mainbus; always succeeds. | |
54 | */ | 53 | */ | |
55 | static int | 54 | static int | |
56 | mainbus_match(device_t parent, struct cfdata *match, void *aux) | 55 | mainbus_match(device_t parent, cfdata_t match, void *aux) | |
57 | { | 56 | { | |
58 | 57 | |||
59 | return 1; | 58 | return 1; | |
60 | } | 59 | } | |
61 | 60 | |||
62 | /* | 61 | /* | |
63 | * Attach the mainbus. | 62 | * Attach the mainbus. | |
64 | */ | 63 | */ | |
65 | static void | 64 | static void | |
66 | mainbus_attach(device_t parent, device_t self, void *aux) | 65 | mainbus_attach(device_t parent, device_t self, void *aux) | |
67 | { | 66 | { | |
68 | #if NACPI > 0 | 67 | #if NACPI > 0 | |
69 | struct acpibus_attach_args aaa; | 68 | struct acpibus_attach_args aaa; |