Sun Jun 5 17:03:19 2011 UTC ()
struct device * -> device_t, struct cfdata * -> cfdata_t
CFATTACH_DECL(*, sizeof(struct device), -> CFATTACH_DECL_NEW(&, 0


(matt)
diff -r1.21 -r1.22 src/sys/arch/algor/dev/mainbus.c
diff -r1.1 -r1.2 src/sys/arch/amigappc/amigappc/cpu.c
diff -r1.2 -r1.3 src/sys/arch/amigappc/amigappc/mainbus.c
diff -r1.10 -r1.11 src/sys/arch/arm/mainbus/cpu_mainbus.c
diff -r1.16 -r1.17 src/sys/arch/arm/mainbus/mainbus.c
diff -r1.1 -r1.2 src/sys/arch/emips/emips/mainbus.c
diff -r1.6 -r1.7 src/sys/arch/evbppc/ev64260/mainbus.c
diff -r1.3 -r1.4 src/sys/arch/evbppc/pmppc/mainbus.c
diff -r1.8 -r1.9 src/sys/arch/luna68k/luna68k/mainbus.c
diff -r1.20 -r1.21 src/sys/arch/mac68k/mac68k/mainbus.c
diff -r1.55 -r1.56 src/sys/arch/macppc/macppc/cpu.c
diff -r1.20 -r1.21 src/sys/arch/macppc/macppc/mainbus.c
diff -r1.8 -r1.9 src/sys/arch/mmeye/mmeye/mainbus.c
diff -r1.20 -r1.21 src/sys/arch/mvme68k/dev/mainbus.c
diff -r1.8 -r1.9 src/sys/arch/mvmeppc/mvmeppc/cpu.c
diff -r1.12 -r1.13 src/sys/arch/mvmeppc/mvmeppc/mainbus.c
diff -r1.10 -r1.11 src/sys/arch/next68k/next68k/mainbus.c
diff -r1.14 -r1.15 src/sys/arch/ofppc/ofppc/cpu.c
diff -r1.26 -r1.27 src/sys/arch/ofppc/ofppc/mainbus.c
diff -r1.28 -r1.29 src/sys/arch/powerpc/ibm4xx/cpu.c
diff -r1.15 -r1.16 src/sys/arch/prep/prep/cpu.c
diff -r1.30 -r1.31 src/sys/arch/prep/prep/mainbus.c
diff -r1.2 -r1.3 src/sys/arch/rs6000/rs6000/cpu.c
diff -r1.3 -r1.4 src/sys/arch/rs6000/rs6000/mainbus.c
diff -r1.22 -r1.23 src/sys/arch/sandpoint/sandpoint/mainbus.c
diff -r1.7 -r1.8 src/sys/arch/shark/ofw/cpu_ofbus.c

cvs diff -r1.21 -r1.22 src/sys/arch/algor/dev/mainbus.c (expand / switch to context diff)
--- src/sys/arch/algor/dev/mainbus.c 2011/02/20 07:51:21 1.21
+++ src/sys/arch/algor/dev/mainbus.c 2011/06/05 17:03:18 1.22
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.21 2011/02/20 07:51:21 matt Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.22 2011/06/05 17:03:18 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21 2011/02/20 07:51:21 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.22 2011/06/05 17:03:18 matt Exp $");
 
 #include "opt_algor_p4032.h"
 #include "opt_algor_p5064.h"
@@ -63,14 +63,14 @@
 #include "locators.h"
 #include "pci.h"
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 int	mainbus_print(void *, const char *);
-int	mainbus_submatch(struct device *, struct cfdata *,
+int	mainbus_submatch(device_t, cfdata_t,
 			 const int *, void *);
 
 /* There can be only one. */
@@ -125,7 +125,7 @@
 #endif /* ALGOR_P6032 */
 
 int
-mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 
 	if (mainbus_found)
@@ -135,7 +135,7 @@
 }
 
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct mainbus_attach_args ma;
 	struct mainbusdev *md;
@@ -247,7 +247,7 @@
 }
 
 int
-mainbus_submatch(struct device *parent, struct cfdata *cf,
+mainbus_submatch(device_t parent, cfdata_t cf,
 		 const int *ldesc, void *aux)
 {
 	struct mainbus_attach_args *ma = aux;

cvs diff -r1.1 -r1.2 src/sys/arch/amigappc/amigappc/cpu.c (expand / switch to context diff)
--- src/sys/arch/amigappc/amigappc/cpu.c 2009/07/21 09:49:15 1.1
+++ src/sys/arch/amigappc/amigappc/cpu.c 2011/06/05 17:03:16 1.2
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.1 2009/07/21 09:49:15 phx Exp $	*/
+/*	$NetBSD: cpu.c,v 1.2 2011/06/05 17:03:16 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008,2009 Frank Wille.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.1 2009/07/21 09:49:15 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -41,16 +41,16 @@
 
 #include <amiga/amiga/device.h>
 
-int cpu_match(struct device *, struct cfdata *, void *);
-void cpu_attach(struct device *, struct device *, void *);
+int cpu_match(device_t, cfdata_t, void *);
+void cpu_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpu_match, cpu_attach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
 
 int
-cpu_match(struct device *parent, struct cfdata *cf, void *aux)
+cpu_match(device_t parent, cfdata_t cf, void *aux)
 {
 
 	if (strcmp((char *)aux, cpu_cd.cd_name) != 0)
@@ -61,7 +61,7 @@
 }
 
 void
-cpu_attach(struct device *parent, struct device *self, void *aux)
+cpu_attach(device_t parent, device_t self, void *aux)
 {
 
 	if (amiga_realconfig)

cvs diff -r1.2 -r1.3 src/sys/arch/amigappc/amigappc/mainbus.c (expand / switch to context diff)
--- src/sys/arch/amigappc/amigappc/mainbus.c 2010/05/21 12:52:14 1.2
+++ src/sys/arch/amigappc/amigappc/mainbus.c 2011/06/05 17:03:16 1.3
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.2 2010/05/21 12:52:14 phx Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.3 2011/06/05 17:03:16 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008,2009 Frank Wille.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.2 2010/05/21 12:52:14 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.3 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -79,22 +79,22 @@
 #endif
 #endif
 
-void mbattach(struct device *, struct device *, void *);
+void mbattach(device_t, device_t, void *);
 int mbprint(void *, const char *);
-int mbmatch(struct device *, struct cfdata *, void *);
+int mbmatch(device_t, cfdata_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mbmatch, mbattach, NULL, NULL);
 
 int
-mbmatch(struct device *parent, struct cfdata *cfp, void *aux)
+mbmatch(device_t parent, cfdata_t cfp, void *aux)
 {
 
 	return 1;
 }
 
 void
-mbattach(struct device *parent, struct device *self, void *aux)
+mbattach(device_t parent, device_t self, void *aux)
 {
 
 	printf("\n");

cvs diff -r1.10 -r1.11 src/sys/arch/arm/mainbus/cpu_mainbus.c (expand / switch to context diff)
--- src/sys/arch/arm/mainbus/cpu_mainbus.c 2009/03/14 15:36:02 1.10
+++ src/sys/arch/arm/mainbus/cpu_mainbus.c 2011/06/05 17:03:16 1.11
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_mainbus.c,v 1.10 2009/03/14 15:36:02 dsl Exp $	*/
+/*	$NetBSD: cpu_mainbus.c,v 1.11 2011/06/05 17:03:16 matt Exp $	*/
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_mainbus.c,v 1.10 2009/03/14 15:36:02 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_mainbus.c,v 1.11 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -63,33 +63,33 @@
 /*
  * Prototypes
  */
-static int cpu_mainbus_match(struct device *, struct cfdata *, void *);
-static void cpu_mainbus_attach(struct device *, struct device *, void *);
+static int cpu_mainbus_match(device_t, cfdata_t, void *);
+static void cpu_mainbus_attach(device_t, device_t, void *);
  
 /*
- * int cpumatch(struct device *parent, struct cfdata *cf, void *aux)
+ * int cpumatch(device_t parent, cfdata_t cf, void *aux)
  *
  * Probe for the main cpu. Currently all this does is return 1 to
  * indicate that the cpu was found.
  */ 
  
 static int
-cpu_mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+cpu_mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 	return(1);
 }
 
 /*
- * void cpusattach(struct device *parent, struct device *dev, void *aux)
+ * void cpusattach(device_t parent, device_t dev, void *aux)
  *
  * Attach the main cpu
  */
   
 static void
-cpu_mainbus_attach(struct device *parent, struct device *self, void *aux)
+cpu_mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	cpu_attach(self);
 }
 
-CFATTACH_DECL(cpu_mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu_mainbus, 0,
     cpu_mainbus_match, cpu_mainbus_attach, NULL, NULL);

cvs diff -r1.16 -r1.17 src/sys/arch/arm/mainbus/mainbus.c (expand / switch to context diff)
--- src/sys/arch/arm/mainbus/mainbus.c 2009/03/14 15:36:02 1.16
+++ src/sys/arch/arm/mainbus/mainbus.c 2011/06/05 17:03:16 1.17
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.16 2009/03/14 15:36:02 dsl Exp $ */
+/* $NetBSD: mainbus.c,v 1.17 2011/06/05 17:03:16 matt Exp $ */
 
 /*
  * Copyright (c) 1994,1995 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.16 2009/03/14 15:36:02 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.17 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -68,25 +68,25 @@
 
 /* Prototypes for functions provided */
 
-static int  mainbusmatch(struct device *, struct cfdata *, void *);
-static void mainbusattach(struct device *, struct device *, void *);
+static int  mainbusmatch(device_t, cfdata_t, void *);
+static void mainbusattach(device_t, device_t, void *);
 static int  mainbusprint(void *aux, const char *mainbus);
-static int  mainbussearch(struct device *, struct cfdata *,
+static int  mainbussearch(device_t, cfdata_t,
 				const int *, void *);
 
 /* attach and device structures for the device */
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbusmatch, mainbusattach, NULL, NULL);
 
 /*
- * int mainbusmatch(struct device *parent, struct cfdata *cf, void *aux)
+ * int mainbusmatch(device_t parent, cfdata_t cf, void *aux)
  *
  * Always match for unit 0
  */
 
 static int
-mainbusmatch(struct device *parent, struct cfdata *cf, void *aux)
+mainbusmatch(device_t parent, cfdata_t cf, void *aux)
 {
 	return (1);
 }
@@ -116,13 +116,13 @@
 }
 
 /*
- * int mainbussearch(struct device *parent, struct device *self, void *aux)
+ * int mainbussearch(device_t parent, device_t self, void *aux)
  *
  * search routine used during the config of children
  */
 
 static int
-mainbussearch(struct device *parent, struct cfdata *cf, const int *ldesc, void *aux)
+mainbussearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
 	struct mainbus_attach_args mb;
 	int tryagain;
@@ -155,13 +155,13 @@
 }
 
 /*
- * void mainbusattach(struct device *parent, struct device *self, void *aux)
+ * void mainbusattach(device_t parent, device_t self, void *aux)
  *
  * probe and attach all children
  */
 
 static void
-mainbusattach(struct device *parent, struct device *self, void *aux)
+mainbusattach(device_t parent, device_t self, void *aux)
 {
 	aprint_naive("\n");
 	aprint_normal("\n");

cvs diff -r1.1 -r1.2 src/sys/arch/emips/emips/mainbus.c (expand / switch to context diff)
--- src/sys/arch/emips/emips/mainbus.c 2011/01/26 01:18:50 1.1
+++ src/sys/arch/emips/emips/mainbus.c 2011/06/05 17:03:16 1.2
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.1 2011/01/26 01:18:50 pooka Exp $ */
+/* $NetBSD: mainbus.c,v 1.2 2011/06/05 17:03:16 matt Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.1 2011/01/26 01:18:50 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.2 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -39,17 +39,17 @@
 #include <machine/autoconf.h>
 
 /* Definition of the mainbus driver. */
-static int	mbmatch(struct device *, struct cfdata *, void *);
-static void	mbattach(struct device *, struct device *, void *);
+static int	mbmatch(device_t, cfdata_t, void *);
+static void	mbattach(device_t, device_t, void *);
 static int	mbprint(void *, const char *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mbmatch, mbattach, NULL, NULL);
 
 static int mainbus_found;
 
 static int
-mbmatch(struct device *parent, struct cfdata *cf, void *aux)
+mbmatch(device_t parent, cfdata_t cf, void *aux)
 {
 
 	if (mainbus_found)
@@ -61,7 +61,7 @@
 int ncpus = 0;	/* only support uniprocessors, for now */
 
 static void
-mbattach(struct device *parent, struct device *self, void *aux)
+mbattach(device_t parent, device_t self, void *aux)
 {
 	struct mainbus_attach_args ma;
 

cvs diff -r1.6 -r1.7 src/sys/arch/evbppc/ev64260/mainbus.c (expand / switch to context diff)
--- src/sys/arch/evbppc/ev64260/mainbus.c 2010/04/28 13:51:55 1.6
+++ src/sys/arch/evbppc/ev64260/mainbus.c 2011/06/05 17:03:18 1.7
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.6 2010/04/28 13:51:55 kiyohara Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.7 2011/06/05 17:03:18 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.6 2010/04/28 13:51:55 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.7 2011/06/05 17:03:18 matt Exp $");
 
 #include "mainbus.h"
 #include "opt_multiprocessor.h"
@@ -54,7 +54,7 @@
 void	mainbus_attach(device_t, device_t, void *);
 int	mainbus_cfprint(void *, const char *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
 	mainbus_match, mainbus_attach, NULL, NULL);
 
 /*
@@ -125,7 +125,7 @@
 static int	cpu_match(device_t, cfdata_t, void *);
 static void	cpu_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device), cpu_match, cpu_attach, NULL, NULL);
+CFATTACH_DECL_NEW(cpu, 0, cpu_match, cpu_attach, NULL, NULL);
 
 int
 cpu_match(device_t parent, cfdata_t cf, void *aux)

cvs diff -r1.3 -r1.4 src/sys/arch/evbppc/pmppc/mainbus.c (expand / switch to context diff)
--- src/sys/arch/evbppc/pmppc/mainbus.c 2008/04/28 20:23:17 1.3
+++ src/sys/arch/evbppc/pmppc/mainbus.c 2011/06/05 17:03:18 1.4
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.3 2008/04/28 20:23:17 martin Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.4 2011/06/05 17:03:18 matt Exp $	*/
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.3 2008/04/28 20:23:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.4 2011/06/05 17:03:18 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -49,10 +49,10 @@
 #error	A cpu device is now required
 #endif
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 static int mainbus_print(void *, const char *);
@@ -61,14 +61,14 @@
  * Probe for the mainbus; always succeeds.
  */
 int
-mainbus_match(struct device *parent, struct cfdata *match, void *aux)
+mainbus_match(device_t parent, cfdata_t match, void *aux)
 {
 
 	return 1;
 }
 
 static int
-mainbus_submatch(struct device *parent, struct cfdata *cf,
+mainbus_submatch(device_t parent, cfdata_t cf,
 		 const int *ldesc, void *aux)
 {
 	struct mainbus_attach_args *maa = aux;
@@ -97,7 +97,7 @@
  * Attach the mainbus.
  */
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct mainbus_attach_args maa;
 
@@ -150,16 +150,16 @@
 	config_found(self, &maa, mainbus_print);
 }
 
-static int	cpu_match(struct device *, struct cfdata *, void *);
-static void	cpu_attach(struct device *, struct device *, void *);
+static int	cpu_match(device_t, cfdata_t, void *);
+static void	cpu_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpu_match, cpu_attach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
 
 int
-cpu_match(struct device *parent, struct cfdata *cf, void *aux)
+cpu_match(device_t parent, cfdata_t cf, void *aux)
 {
 	struct mainbus_attach_args *maa = aux;
 
@@ -173,7 +173,7 @@
 }
 
 void
-cpu_attach(struct device *parent, struct device *self, void *aux)
+cpu_attach(device_t parent, device_t self, void *aux)
 {
 	(void) cpu_attach_common(self, 0);
 }

cvs diff -r1.8 -r1.9 src/sys/arch/luna68k/luna68k/mainbus.c (expand / switch to context diff)
--- src/sys/arch/luna68k/luna68k/mainbus.c 2009/03/14 21:04:11 1.8
+++ src/sys/arch/luna68k/luna68k/mainbus.c 2011/06/05 17:03:18 1.9
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.8 2009/03/14 21:04:11 dsl Exp $ */
+/* $NetBSD: mainbus.c,v 1.9 2011/06/05 17:03:18 matt Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.8 2009/03/14 21:04:11 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.9 2011/06/05 17:03:18 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -51,15 +51,15 @@
 #endif
 };
 
-static void mainbus_attach(struct device *, struct device *, void *);
-static int  mainbus_match(struct device *, struct cfdata *, void *);
+static void mainbus_attach(device_t, device_t, void *);
+static int  mainbus_match(device_t, cfdata_t, void *);
 static int  mainbus_print(void *, const char *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 static int
-mainbus_match(struct device *parent, struct cfdata *cf, void *args)
+mainbus_match(device_t parent, cfdata_t cf, void *args)
 {
 	static int mainbus_matched;
 
@@ -70,7 +70,7 @@
 }
 
 static void
-mainbus_attach(struct device *parent, struct device *self, void *args)
+mainbus_attach(device_t parent, device_t self, void *args)
 {
 	int i;
 	

cvs diff -r1.20 -r1.21 src/sys/arch/mac68k/mac68k/mainbus.c (expand / switch to context diff)
--- src/sys/arch/mac68k/mac68k/mainbus.c 2008/04/28 20:23:27 1.20
+++ src/sys/arch/mac68k/mac68k/mainbus.c 2011/06/05 17:03:18 1.21
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.20 2008/04/28 20:23:27 martin Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.21 2011/06/05 17:03:18 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.20 2008/04/28 20:23:27 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21 2011/06/05 17:03:18 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -39,12 +39,12 @@
 #define _M68K_BUS_DMA_PRIVATE
 #include <machine/autoconf.h>
 
-static int	mainbus_match(struct device *, struct cfdata *, void *);
-static void	mainbus_attach(struct device *, struct device *, void *);
-static int	mainbus_search(struct device *, struct cfdata *,
+static int	mainbus_match(device_t, cfdata_t, void *);
+static void	mainbus_attach(device_t, device_t, void *);
+static int	mainbus_search(device_t, cfdata_t,
 			       const int *ldesc, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 struct m68k_bus_dma_tag mac68k_bus_dma_tag = {
@@ -69,7 +69,7 @@
 };
 
 static int
-mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 	static int mainbus_matched = 0;
 
@@ -82,7 +82,7 @@
 }
 
 static void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct mainbus_attach_args	mba;
 
@@ -96,7 +96,7 @@
 }
 
 static int
-mainbus_search(struct device *parent, struct cfdata *cf,
+mainbus_search(device_t parent, cfdata_t cf,
 	       const int *ldesc, void *aux)
 {
 	if (config_match(parent, cf, aux) > 0)

cvs diff -r1.55 -r1.56 src/sys/arch/macppc/macppc/cpu.c (expand / switch to context diff)
--- src/sys/arch/macppc/macppc/cpu.c 2011/06/05 16:52:24 1.55
+++ src/sys/arch/macppc/macppc/cpu.c 2011/06/05 17:03:16 1.56
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.55 2011/06/05 16:52:24 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.56 2011/06/05 17:03:16 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 Tsubai Masanari.
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.55 2011/06/05 16:52:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.56 2011/06/05 17:03:16 matt Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_multiprocessor.h"
@@ -75,13 +75,13 @@
 #endif /* NOPENPIC > 0 */
 #endif /* OPENPIC */
 
-int cpumatch(struct device *, struct cfdata *, void *);
-void cpuattach(struct device *, struct device *, void *);
+int cpumatch(device_t, cfdata_t, void *);
+void cpuattach(device_t, device_t, void *);
 
 void identifycpu(char *);
 static void ohare_init(void);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpumatch, cpuattach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
@@ -96,7 +96,7 @@
 #endif
 
 int
-cpumatch(struct device *parent, struct cfdata *cf, void *aux)
+cpumatch(device_t parent, cfdata_t cf, void *aux)
 {
 	struct confargs *ca = aux;
 	int *reg = ca->ca_reg;
@@ -128,10 +128,10 @@
 	return 0;
 }
 
-void cpu_OFgetspeed(struct device *, struct cpu_info *);
+void cpu_OFgetspeed(device_t, struct cpu_info *);
 
 void
-cpu_OFgetspeed(struct device *self, struct cpu_info *ci)
+cpu_OFgetspeed(device_t self, struct cpu_info *ci)
 {
 	int	node;
 
@@ -154,7 +154,7 @@
 }
 
 void
-cpuattach(struct device *parent, struct device *self, void *aux)
+cpuattach(device_t parent, device_t self, void *aux)
 {
 	struct cpu_info *ci;
 	struct confargs *ca = aux;

cvs diff -r1.20 -r1.21 src/sys/arch/macppc/macppc/mainbus.c (expand / switch to context diff)
--- src/sys/arch/macppc/macppc/mainbus.c 2009/03/14 21:04:12 1.20
+++ src/sys/arch/macppc/macppc/mainbus.c 2011/06/05 17:03:16 1.21
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.20 2009/03/14 21:04:12 dsl Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.21 2011/06/05 17:03:16 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.20 2009/03/14 21:04:12 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -44,17 +44,17 @@
 
 #include <powerpc/pic/picvar.h>
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 /*
  * Probe for the mainbus; always succeeds.
  */
 int
-mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 	return 1;
 }
@@ -63,7 +63,7 @@
  * Attach the mainbus.
  */
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct ofbus_attach_args oba;
 	struct confargs ca;

cvs diff -r1.8 -r1.9 src/sys/arch/mmeye/mmeye/mainbus.c (expand / switch to context diff)
--- src/sys/arch/mmeye/mmeye/mainbus.c 2011/02/19 10:46:29 1.8
+++ src/sys/arch/mmeye/mmeye/mainbus.c 2011/06/05 17:03:18 1.9
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.8 2011/02/19 10:46:29 kiyohara Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.9 2011/06/05 17:03:18 matt Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.8 2011/02/19 10:46:29 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.9 2011/06/05 17:03:18 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -36,16 +36,16 @@
 
 #include "locators.h"
 
-static int mainbus_match(device_t, struct cfdata *, void *);
+static int mainbus_match(device_t, cfdata_t, void *);
 static void mainbus_attach(device_t, device_t, void *);
 static int mainbus_search(device_t, cfdata_t, const int *, void *);
 static int mainbus_print(void *, const char *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 static int
-mainbus_match(device_t parent, struct cfdata *cf, void *aux)
+mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 
 	return 1;

cvs diff -r1.20 -r1.21 src/sys/arch/mvme68k/dev/mainbus.c (expand / switch to context diff)
--- src/sys/arch/mvme68k/dev/mainbus.c 2008/04/28 20:23:29 1.20
+++ src/sys/arch/mvme68k/dev/mainbus.c 2011/06/05 17:03:19 1.21
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.20 2008/04/28 20:23:29 martin Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.21 2011/06/05 17:03:19 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.20 2008/04/28 20:23:29 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.21 2011/06/05 17:03:19 matt Exp $");
 
 #include "vmetwo.h"
 
@@ -60,11 +60,11 @@
 #endif
 #endif
 
-void mainbus_attach(struct device *, struct device *, void *);
-int mainbus_match(struct device *, struct cfdata *, void *);
+void mainbus_attach(device_t, device_t, void *);
+int mainbus_match(device_t, cfdata_t, void *);
 int mainbus_print(void *, const char *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 
@@ -122,7 +122,7 @@
 
 /* ARGSUSED */
 int
-mainbus_match(struct device *parent, struct cfdata *cf, void *args)
+mainbus_match(device_t parent, cfdata_t cf, void *args)
 {
 	static int mainbus_matched;
 
@@ -134,7 +134,7 @@
 
 /* ARGSUSED */
 void
-mainbus_attach(struct device *parent, struct device *self, void *args)
+mainbus_attach(device_t parent, device_t self, void *args)
 {
 	struct mainbus_attach_args ma;
 	struct mainbus_devices *devices;

cvs diff -r1.8 -r1.9 src/sys/arch/mvmeppc/mvmeppc/cpu.c (expand / switch to context diff)
--- src/sys/arch/mvmeppc/mvmeppc/cpu.c 2008/04/28 20:23:29 1.8
+++ src/sys/arch/mvmeppc/mvmeppc/cpu.c 2011/06/05 17:03:16 1.9
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.8 2008/04/28 20:23:29 martin Exp $	*/
+/*	$NetBSD: cpu.c,v 1.9 2011/06/05 17:03:16 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.8 2008/04/28 20:23:29 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.9 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -41,16 +41,16 @@
 #include <machine/cpu.h>
 #include <machine/platform.h>
 
-int cpumatch(struct device *, struct cfdata *, void *);
-void cpuattach(struct device *, struct device *, void *);
+int cpumatch(device_t, cfdata_t, void *);
+void cpuattach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpumatch, cpuattach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
 
 int
-cpumatch(struct device *parent, struct cfdata *cfdata, void *aux)
+cpumatch(device_t parent, cfdata_t cfdata, void *aux)
 {
 
 	if (cpu_info[0].ci_dev != NULL)
@@ -59,7 +59,7 @@
 }
 
 void
-cpuattach(struct device *parent, struct device *self, void *aux)
+cpuattach(device_t parent, device_t self, void *aux)
 {
 	cpu_attach_common(self, 0);
 

cvs diff -r1.12 -r1.13 src/sys/arch/mvmeppc/mvmeppc/mainbus.c (expand / switch to context diff)
--- src/sys/arch/mvmeppc/mvmeppc/mainbus.c 2011/05/17 17:34:51 1.12
+++ src/sys/arch/mvmeppc/mvmeppc/mainbus.c 2011/06/05 17:03:16 1.13
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.12 2011/05/17 17:34:51 dyoung Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.13 2011/06/05 17:03:16 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.12 2011/05/17 17:34:51 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.13 2011/06/05 17:03:16 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/extent.h>
@@ -49,10 +49,10 @@
 #include <machine/pci_machdep.h>
 #include <machine/isa_machdep.h>
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 int	mainbus_print(void *, const char *);
@@ -67,7 +67,7 @@
  * Probe for the mainbus; always succeeds.
  */
 int
-mainbus_match(struct device *parent, struct cfdata *match, void *aux)
+mainbus_match(device_t parent, cfdata_t match, void *aux)
 {
 
 	if (mainbus_found)
@@ -79,7 +79,7 @@
  * Attach the mainbus.
  */
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct pcibus_attach_args pba;
 #if NPCI > 0

cvs diff -r1.10 -r1.11 src/sys/arch/next68k/next68k/mainbus.c (expand / switch to context diff)
--- src/sys/arch/next68k/next68k/mainbus.c 2008/04/28 20:23:30 1.10
+++ src/sys/arch/next68k/next68k/mainbus.c 2011/06/05 17:03:19 1.11
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.10 2008/04/28 20:23:30 martin Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.11 2011/06/05 17:03:19 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.10 2008/04/28 20:23:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.11 2011/06/05 17:03:19 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -39,12 +39,12 @@
 #define _M68K_BUS_DMA_PRIVATE
 #include <machine/autoconf.h>
 
-static int	mainbus_match(struct device *, struct cfdata *, void *);
-static void	mainbus_attach(struct device *, struct device *, void *);
-static int	mainbus_search(struct device *, struct cfdata *,
+static int	mainbus_match(device_t, cfdata_t, void *);
+static void	mainbus_attach(device_t, device_t, void *);
+static int	mainbus_search(device_t, cfdata_t,
 			       const int *, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 struct m68k_bus_dma_tag next68k_bus_dma_tag = {
@@ -71,7 +71,7 @@
 static int mainbus_attached = 0;
 
 static int
-mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 	/* Allow only one instance. */
 	if (mainbus_attached)
@@ -81,7 +81,7 @@
 }
 
 static void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct mainbus_attach_args	mba;
 
@@ -96,7 +96,7 @@
 }
 
 static int
-mainbus_search(struct device *parent, struct cfdata *cf,
+mainbus_search(device_t parent, cfdata_t cf,
 	       const int *ldesc, void *aux)
 {
 	if (config_match(parent, cf, aux) > 0)

cvs diff -r1.14 -r1.15 src/sys/arch/ofppc/ofppc/cpu.c (expand / switch to context diff)
--- src/sys/arch/ofppc/ofppc/cpu.c 2011/06/05 16:52:24 1.14
+++ src/sys/arch/ofppc/ofppc/cpu.c 2011/06/05 17:03:16 1.15
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.14 2011/06/05 16:52:24 matt Exp $	*/
+/*	$NetBSD: cpu.c,v 1.15 2011/06/05 17:03:16 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.14 2011/06/05 16:52:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.15 2011/06/05 17:03:16 matt Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_multiprocessor.h"
@@ -73,18 +73,18 @@
 #endif /* NOPENPIC > 0 */
 #endif /* OPENPIC */
 
-static int cpu_match(struct device *, struct cfdata *, void *);
-static void cpu_attach(struct device *, struct device *, void *);
-void cpu_OFgetspeed(struct device *, struct cpu_info *);
+static int cpu_match(device_t, cfdata_t, void *);
+static void cpu_attach(device_t, device_t, void *);
+void cpu_OFgetspeed(device_t, struct cpu_info *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpu_match, cpu_attach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
 extern int machine_has_rtas;
 
 int
-cpu_match(struct device *parent, struct cfdata *cfdata, void *aux)
+cpu_match(device_t parent, cfdata_t cfdata, void *aux)
 {
 	struct confargs *ca = aux;
 	int *reg = ca->ca_reg;
@@ -110,7 +110,7 @@
 }
 
 void
-cpu_OFgetspeed(struct device *self, struct cpu_info *ci)
+cpu_OFgetspeed(device_t self, struct cpu_info *ci)
 {
 	int node;
 	node = OF_finddevice("/cpus");
@@ -168,7 +168,7 @@
 }
 
 static void
-cpu_OFgetcache(struct device *self, struct cpu_info *ci)
+cpu_OFgetcache(device_t self, struct cpu_info *ci)
 {
 	int node, cpu=-1;
 	char name[32];
@@ -207,7 +207,7 @@
 
 
 void
-cpu_attach(struct device *parent, struct device *self, void *aux)
+cpu_attach(device_t parent, device_t self, void *aux)
 {
 	struct cpu_info *ci;
 	struct confargs *ca = aux;

cvs diff -r1.26 -r1.27 src/sys/arch/ofppc/ofppc/mainbus.c (expand / switch to context diff)
--- src/sys/arch/ofppc/ofppc/mainbus.c 2010/06/09 04:41:42 1.26
+++ src/sys/arch/ofppc/ofppc/mainbus.c 2011/06/05 17:03:16 1.27
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.26 2010/06/09 04:41:42 kiyohara Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.27 2011/06/05 17:03:16 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.26 2010/06/09 04:41:42 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.27 2011/06/05 17:03:16 matt Exp $");
 
 #include "opt_interrupt.h"
 #include "opt_multiprocessor.h"
@@ -52,10 +52,10 @@
 #include <dev/isa/isareg.h>
 #include <dev/isa/isavar.h>
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 int mainbus_found = 0;
@@ -208,7 +208,7 @@
  * Probe for the mainbus; always succeeds.
  */
 int
-mainbus_match(struct device *parent, struct cfdata *cf, void *aux)
+mainbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 	if (mainbus_found)
 		return 0;
@@ -219,7 +219,7 @@
  * Attach the mainbus.
  */
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct ofbus_attach_args oba;
 	struct confargs ca;

cvs diff -r1.28 -r1.29 src/sys/arch/powerpc/ibm4xx/cpu.c (expand / switch to context diff)
--- src/sys/arch/powerpc/ibm4xx/cpu.c 2010/03/18 13:47:05 1.28
+++ src/sys/arch/powerpc/ibm4xx/cpu.c 2011/06/05 17:03:17 1.29
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.28 2010/03/18 13:47:05 kiyohara Exp $	*/
+/*	$NetBSD: cpu.c,v 1.29 2011/06/05 17:03:17 matt Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.28 2010/03/18 13:47:05 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.29 2011/06/05 17:03:17 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -72,10 +72,10 @@
 	{ 0, 		0,		NULL 		}
 };
 
-static int	cpumatch(struct device *, struct cfdata *, void *);
-static void	cpuattach(struct device *, struct device *, void *);
+static int	cpumatch(device_t, cfdata_t, void *);
+static void	cpuattach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpumatch, cpuattach, NULL, NULL);
 
 int ncpus;
@@ -102,7 +102,7 @@
 int cpufound = 0;
 
 static int
-cpumatch(struct device *parent, struct cfdata *cf, void *aux)
+cpumatch(device_t parent, cfdata_t cf, void *aux)
 {
 	struct plb_attach_args *paa = aux;
 
@@ -114,7 +114,7 @@
 }
 
 static void
-cpuattach(struct device *parent, struct device *self, void *aux)
+cpuattach(device_t parent, device_t self, void *aux)
 {
 	struct cputab *cp = models;
 	u_int pvr;

cvs diff -r1.15 -r1.16 src/sys/arch/prep/prep/cpu.c (expand / switch to context diff)
--- src/sys/arch/prep/prep/cpu.c 2008/04/28 20:23:33 1.15
+++ src/sys/arch/prep/prep/cpu.c 2011/06/05 17:03:17 1.16
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.15 2008/04/28 20:23:33 martin Exp $	*/
+/*	$NetBSD: cpu.c,v 1.16 2011/06/05 17:03:17 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.15 2008/04/28 20:23:33 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.16 2011/06/05 17:03:17 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -50,16 +50,16 @@
 extern void openpic_set_priority(int, int);
 #endif
 
-int cpumatch(struct device *, struct cfdata *, void *);
-void cpuattach(struct device *, struct device *, void *);
+int cpumatch(device_t, cfdata_t, void *);
+void cpuattach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpumatch, cpuattach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
 
 int
-cpumatch(struct device *parent, struct cfdata *cfdata, void *aux)
+cpumatch(device_t parent, cfdata_t cfdata, void *aux)
 {
 	struct confargs *ca = aux;
 
@@ -73,7 +73,7 @@
 }
 
 void
-cpuattach(struct device *parent, struct device *self, void *aux)
+cpuattach(device_t parent, device_t self, void *aux)
 {
 	struct cpu_info *ci;
 	struct confargs *ca = aux;

cvs diff -r1.30 -r1.31 src/sys/arch/prep/prep/mainbus.c (expand / switch to context diff)
--- src/sys/arch/prep/prep/mainbus.c 2011/05/17 17:34:52 1.30
+++ src/sys/arch/prep/prep/mainbus.c 2011/06/05 17:03:17 1.31
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.30 2011/05/17 17:34:52 dyoung Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.31 2011/06/05 17:03:17 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.30 2011/05/17 17:34:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.31 2011/06/05 17:03:17 matt Exp $");
 
 #include "opt_pci.h"
 #include "opt_residual.h"
@@ -58,10 +58,10 @@
 #include <machine/platform.h>
 #include <machine/residual.h>
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 int	mainbus_print(void *, const char *);
@@ -81,7 +81,7 @@
  * Probe for the mainbus; always succeeds.
  */
 int
-mainbus_match(struct device *parent, struct cfdata *match, void *aux)
+mainbus_match(device_t parent, cfdata_t match, void *aux)
 {
 
 	if (mainbus_found)
@@ -93,7 +93,7 @@
  * Attach the mainbus.
  */
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	union mainbus_attach_args mba;
 	struct confargs ca;

cvs diff -r1.2 -r1.3 src/sys/arch/rs6000/rs6000/cpu.c (expand / switch to context diff)
--- src/sys/arch/rs6000/rs6000/cpu.c 2008/04/28 20:23:34 1.2
+++ src/sys/arch/rs6000/rs6000/cpu.c 2011/06/05 17:03:17 1.3
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.2 2008/04/28 20:23:34 martin Exp $	*/
+/*	$NetBSD: cpu.c,v 1.3 2011/06/05 17:03:17 matt Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.2 2008/04/28 20:23:34 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.3 2011/06/05 17:03:17 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -40,16 +40,16 @@
 #include <machine/bus.h>
 #include <machine/cpu.h>
 
-int cpumatch(struct device *, struct cfdata *, void *);
-void cpuattach(struct device *, struct device *, void *);
+int cpumatch(device_t, cfdata_t, void *);
+void cpuattach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpumatch, cpuattach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
 
 int
-cpumatch(struct device *parent, struct cfdata *cfdata, void *aux)
+cpumatch(device_t parent, cfdata_t cfdata, void *aux)
 {
 	struct confargs *ca = aux;
 
@@ -61,7 +61,7 @@
 }
 
 void
-cpuattach(struct device *parent, struct device *self, void *aux)
+cpuattach(device_t parent, device_t self, void *aux)
 {
 	struct cpu_info *ci;
 

cvs diff -r1.3 -r1.4 src/sys/arch/rs6000/rs6000/mainbus.c (expand / switch to context diff)
--- src/sys/arch/rs6000/rs6000/mainbus.c 2009/01/18 16:46:12 1.3
+++ src/sys/arch/rs6000/rs6000/mainbus.c 2011/06/05 17:03:17 1.4
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.3 2009/01/18 16:46:12 christos Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.4 2011/06/05 17:03:17 matt Exp $	*/
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.3 2009/01/18 16:46:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.4 2011/06/05 17:03:17 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/extent.h>
@@ -48,10 +48,10 @@
 #include <dev/mca/mcavar.h>
 #endif
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 int	mainbus_print(void *, const char *);
@@ -70,7 +70,7 @@
  * Probe for the mainbus; always succeeds.
  */
 int
-mainbus_match(struct device *parent, struct cfdata *match, void *aux)
+mainbus_match(device_t parent, cfdata_t match, void *aux)
 {
 
 	if (mainbus_found)
@@ -82,7 +82,7 @@
  * Attach the mainbus.
  */
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	union mainbus_attach_args mba;
 	struct confargs ca;

cvs diff -r1.22 -r1.23 src/sys/arch/sandpoint/sandpoint/mainbus.c (expand / switch to context diff)
--- src/sys/arch/sandpoint/sandpoint/mainbus.c 2011/05/17 17:34:52 1.22
+++ src/sys/arch/sandpoint/sandpoint/mainbus.c 2011/06/05 17:03:19 1.23
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.22 2011/05/17 17:34:52 dyoung Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.23 2011/06/05 17:03:19 matt Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.22 2011/05/17 17:34:52 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.23 2011/06/05 17:03:19 matt Exp $");
 
 #include "opt_pci.h"
 #include "pci.h"
@@ -52,11 +52,11 @@
 	const char *ca_name;
 };
 
-int	mainbus_match(struct device *, struct cfdata *, void *);
-void	mainbus_attach(struct device *, struct device *, void *);
+int	mainbus_match(device_t, cfdata_t, void *);
+void	mainbus_attach(device_t, device_t, void *);
 int	mainbus_print(void *, const char *);
 
-CFATTACH_DECL(mainbus, sizeof(struct device),
+CFATTACH_DECL_NEW(mainbus, 0,
     mainbus_match, mainbus_attach, NULL, NULL);
 
 struct powerpc_isa_chipset genppc_ict;
@@ -65,7 +65,7 @@
  * Probe for the mainbus; always succeeds.
  */
 int
-mainbus_match(struct device *parent, struct cfdata *match, void *aux)
+mainbus_match(device_t parent, cfdata_t match, void *aux)
 {
 
 	return 1;
@@ -75,7 +75,7 @@
  * Attach the mainbus.
  */
 void
-mainbus_attach(struct device *parent, struct device *self, void *aux)
+mainbus_attach(device_t parent, device_t self, void *aux)
 {
 	struct conf_args ca;
 	struct pcibus_attach_args pba;
@@ -122,16 +122,16 @@
 #endif
 }
 
-static int	cpu_match(struct device *, struct cfdata *, void *);
-static void	cpu_attach(struct device *, struct device *, void *);
+static int	cpu_match(device_t, cfdata_t, void *);
+static void	cpu_attach(device_t, device_t, void *);
 
-CFATTACH_DECL(cpu, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu, 0,
     cpu_match, cpu_attach, NULL, NULL);
 
 extern struct cfdriver cpu_cd;
 
 int
-cpu_match(struct device *parent, struct cfdata *cf, void *aux)
+cpu_match(device_t parent, cfdata_t cf, void *aux)
 {
 	struct conf_args *ca = aux;
 
@@ -144,7 +144,7 @@
 }
 
 void
-cpu_attach(struct device *parent, struct device *self, void *aux)
+cpu_attach(device_t parent, device_t self, void *aux)
 {
 
 	(void) cpu_attach_common(self, 0);

cvs diff -r1.7 -r1.8 src/sys/arch/shark/ofw/cpu_ofbus.c (expand / switch to context diff)
--- src/sys/arch/shark/ofw/cpu_ofbus.c 2009/03/14 15:36:13 1.7
+++ src/sys/arch/shark/ofw/cpu_ofbus.c 2011/06/05 17:03:18 1.8
@@ -1,7 +1,7 @@
-/*	$NetBSD: cpu_ofbus.c,v 1.7 2009/03/14 15:36:13 dsl Exp $	*/
+/*	$NetBSD: cpu_ofbus.c,v 1.8 2011/06/05 17:03:18 matt Exp $	*/
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_ofbus.c,v 1.7 2009/03/14 15:36:13 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_ofbus.c,v 1.8 2011/06/05 17:03:18 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -12,14 +12,14 @@
 #include <dev/ofw/openfirm.h>
 
 /*
- * int cpu_ofbus_match(struct device *parent, struct cfdata *cf, void *aux)
+ * int cpu_ofbus_match(device_t parent, cfdata_t cf, void *aux)
  *
  * Probe for the main cpu. Currently all this does is return 1 to
  * indicate that the cpu was found.
  */ 
  
 static int
-cpu_ofbus_match(struct device *parent, struct cfdata *cf, void *aux)
+cpu_ofbus_match(device_t parent, cfdata_t cf, void *aux)
 {
 	struct ofbus_attach_args *aa = aux;
 	char buf[32];
@@ -32,16 +32,16 @@
 }
 
 /*
- * void cpu_ofbus_attach(struct device *parent, struct device *dev, void *aux)
+ * void cpu_ofbus_attach(device_t parent, device_t dev, void *aux)
  *
  * Attach the main cpu
  */
   
 static void
-cpu_ofbus_attach(struct device *parent, struct device *self, void *aux)
+cpu_ofbus_attach(device_t parent, device_t self, void *aux)
 {
 	cpu_attach(self);
 }
 
-CFATTACH_DECL(cpu_ofbus, sizeof(struct device),
+CFATTACH_DECL_NEW(cpu_ofbus, 0,
     cpu_ofbus_match, cpu_ofbus_attach, NULL, NULL);