Module Name: src Committed By: jmcneill Date: Sun Aug 28 15:40:50 UTC 2011
Modified Files: src/sys/dev/pci: azalia.c src/sys/external/bsd/drm/dist/bsd-core: i915_drv.c radeon_drv.c src/sys/modules: Makefile.inc src/sys/modules/azalia: Makefile src/sys/modules/i915drm: Makefile src/sys/modules/pf: Makefile src/sys/modules/radeondrm: Makefile Added Files: src/sys/modules/azalia: azalia.ioconf src/sys/modules/i915drm: i915drm.ioconf src/sys/modules/radeondrm: radeondrm.ioconf Log Message: set default WARNS for modules to 3 -- the only one that needs < 3 now is pf To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/dev/pci/azalia.c cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm/dist/bsd-core/i915_drv.c cvs rdiff -u -r1.10 -r1.11 \ src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c cvs rdiff -u -r1.3 -r1.4 src/sys/modules/Makefile.inc cvs rdiff -u -r1.1 -r1.2 src/sys/modules/azalia/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/azalia/azalia.ioconf cvs rdiff -u -r1.5 -r1.6 src/sys/modules/i915drm/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/i915drm/i915drm.ioconf cvs rdiff -u -r1.1 -r1.2 src/sys/modules/pf/Makefile cvs rdiff -u -r1.8 -r1.9 src/sys/modules/radeondrm/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/radeondrm/radeondrm.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/azalia.c diff -u src/sys/dev/pci/azalia.c:1.75 src/sys/dev/pci/azalia.c:1.76 --- src/sys/dev/pci/azalia.c:1.75 Tue May 25 08:37:10 2010 +++ src/sys/dev/pci/azalia.c Sun Aug 28 15:40:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: azalia.c,v 1.75 2010/05/25 08:37:10 pgoyette Exp $ */ +/* $NetBSD: azalia.c,v 1.76 2011/08/28 15:40:49 jmcneill Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.75 2010/05/25 08:37:10 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: azalia.c,v 1.76 2011/08/28 15:40:49 jmcneill Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -2406,69 +2406,33 @@ return 0; } -#ifdef _MODULE - MODULE(MODULE_CLASS_DRIVER, azalia, NULL); -static const struct cfiattrdata audiobuscf_iattrdata = { - "audiobus", 0, { { NULL, NULL, 0 }, } -}; -static const struct cfiattrdata * const azalia_attrs[] = { - &audiobuscf_iattrdata, NULL -}; -CFDRIVER_DECL(azalia, DV_DULL, azalia_attrs); -extern struct cfattach azalia_ca; -static int azalialoc[] = { -1, -1 }; -static struct cfparent pciparent = { - "pci", "pci", DVUNIT_ANY -}; -static struct cfdata azalia_cfdata[] = { - { - .cf_name = "azalia", - .cf_atname = "azalia", - .cf_unit = 0, - .cf_fstate = FSTATE_STAR, - .cf_loc = azalialoc, - .cf_flags = 0, - .cf_pspec = &pciparent, - }, - { NULL } -}; +#ifdef _MODULE +#include "ioconf.c" +#endif static int azalia_modcmd(modcmd_t cmd, void *arg) { - int err, s; + int error = 0; switch (cmd) { case MODULE_CMD_INIT: - err = config_cfdriver_attach(&azalia_cd); - if (err) - return err; - err = config_cfattach_attach("azalia", &azalia_ca); - if (err) { - config_cfdriver_detach(&azalia_cd); - return err; - } - s = splaudio(); - err = config_cfdata_attach(azalia_cfdata, 1); - splx(s); - if (err) { - config_cfattach_detach("azalia", &azalia_ca); - config_cfdriver_detach(&azalia_cd); - return err; - } - return 0; +#ifdef _MODULE + error = config_init_component(cfdriver_ioconf_azalia, + cfattach_ioconf_azalia, cfdata_ioconf_azalia); +#endif + break; case MODULE_CMD_FINI: - err = config_cfdata_detach(azalia_cfdata); - if (err) - return err; - config_cfattach_detach("azalia", &azalia_ca); - config_cfdriver_detach(&azalia_cd); - return 0; +#ifdef _MODULE + error = config_fini_component(cfdriver_ioconf_azalia, + cfattach_ioconf_azalia, cfdata_ioconf_azalia); +#endif + break; default: return ENOTTY; } -} -#endif + return error; +} Index: src/sys/external/bsd/drm/dist/bsd-core/i915_drv.c diff -u src/sys/external/bsd/drm/dist/bsd-core/i915_drv.c:1.8 src/sys/external/bsd/drm/dist/bsd-core/i915_drv.c:1.9 --- src/sys/external/bsd/drm/dist/bsd-core/i915_drv.c:1.8 Wed Feb 24 22:38:09 2010 +++ src/sys/external/bsd/drm/dist/bsd-core/i915_drv.c Sun Aug 28 15:40:50 2011 @@ -214,62 +214,35 @@ CFATTACH_DECL_NEW(i915drm, sizeof(struct drm_device), i915drm_probe, i915drm_attach, i915drm_detach, NULL); -#ifdef _MODULE - MODULE(MODULE_CLASS_DRIVER, i915drm, "drm"); -CFDRIVER_DECL(i915drm, DV_DULL, NULL); -extern struct cfattach i915drm_ca; -static int drmloc[] = { -1 }; -static struct cfparent drmparent = { - "drm", "vga", DVUNIT_ANY -}; -static struct cfdata i915drm_cfdata[] = { - { - .cf_name = "i915drm", - .cf_atname = "i915drm", - .cf_unit = 0, - .cf_fstate = FSTATE_STAR, - .cf_loc = drmloc, - .cf_flags = 0, - .cf_pspec = &drmparent, - }, - { NULL } -}; +#ifdef _MODULE +#include "ioconf.c" +#endif static int i915drm_modcmd(modcmd_t cmd, void *arg) { - int err; + int error = 0; switch (cmd) { case MODULE_CMD_INIT: - err = config_cfdriver_attach(&i915drm_cd); - if (err) - return err; - err = config_cfattach_attach("i915drm", &i915drm_ca); - if (err) { - config_cfdriver_detach(&i915drm_cd); - return err; - } - err = config_cfdata_attach(i915drm_cfdata, 1); - if (err) { - config_cfattach_detach("i915drm", &i915drm_ca); - config_cfdriver_detach(&i915drm_cd); - return err; - } - return 0; +#ifdef _MODULE + error = config_init_component(cfdriver_ioconf_i915drm, + cfattach_ioconf_i915drm, cfdata_ioconf_i915drm); +#endif + break; case MODULE_CMD_FINI: - err = config_cfdata_detach(i915drm_cfdata); - if (err) - return err; - config_cfattach_detach("i915drm", &i915drm_ca); - config_cfdriver_detach(&i915drm_cd); - return 0; +#ifdef _MODULE + error = config_fini_component(cfdriver_ioconf_i915drm, + cfattach_ioconf_i915drm, cfdata_ioconf_i915drm); +#endif + break; default: return ENOTTY; } + + return 0; } -#endif /* _MODULE */ #endif Index: src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c diff -u src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c:1.10 src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c:1.11 --- src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c:1.10 Mon Jul 5 20:32:24 2010 +++ src/sys/external/bsd/drm/dist/bsd-core/radeon_drv.c Sun Aug 28 15:40:50 2011 @@ -201,64 +201,36 @@ CFATTACH_DECL_NEW(radeondrm, sizeof(struct drm_device), radeondrm_probe, radeondrm_attach, radeondrm_detach, NULL); -#ifdef _MODULE - -MODULE(MODULE_CLASS_DRIVER, radeondrm, NULL); +MODULE(MODULE_CLASS_DRIVER, radeondrm, "drm"); -CFDRIVER_DECL(radeondrm, DV_DULL, NULL); -extern struct cfattach radeondrm_ca; -static int drmloc[] = { -1 }; -static struct cfparent drmparent = { - "drm", "vga", DVUNIT_ANY -}; -static struct cfdata radeondrm_cfdata[] = { - { - .cf_name = "radeondrm", - .cf_atname = "radeondrm", - .cf_unit = 0, - .cf_fstate = FSTATE_STAR, - .cf_loc = drmloc, - .cf_flags = 0, - .cf_pspec = &drmparent, - }, - { NULL } -}; +#ifdef _MODULE +#include "ioconf.c" +#endif static int radeondrm_modcmd(modcmd_t cmd, void *arg) { - int err; + int error = 0; switch (cmd) { case MODULE_CMD_INIT: - err = config_cfdriver_attach(&radeondrm_cd); - if (err) - return err; - err = config_cfattach_attach("radeondrm", &radeondrm_ca); - if (err) { - config_cfdriver_detach(&radeondrm_cd); - return err; - } - err = config_cfdata_attach(radeondrm_cfdata, 1); - if (err) { - config_cfattach_detach("radeondrm", &radeondrm_ca); - config_cfdriver_detach(&radeondrm_cd); - return err; - } - return 0; +#ifdef _MODULE + error = config_init_component(cfdriver_ioconf_radeondrm, + cfattach_ioconf_radeondrm, cfdata_ioconf_radeondrm); +#endif + break; case MODULE_CMD_FINI: - err = config_cfdata_detach(radeondrm_cfdata); - if (err) - return err; - config_cfattach_detach("radeondrm", &radeondrm_ca); - config_cfdriver_detach(&radeondrm_cd); - return 0; +#ifdef _MODULE + error = config_fini_component(cfdriver_ioconf_radeondrm, + cfattach_ioconf_radeondrm, cfdata_ioconf_radeondrm); +#endif + break; default: return ENOTTY; } -} -#endif /* _MODULE */ + return error; +} #include <dev/firmload.h> Index: src/sys/modules/Makefile.inc diff -u src/sys/modules/Makefile.inc:1.3 src/sys/modules/Makefile.inc:1.4 --- src/sys/modules/Makefile.inc:1.3 Sun Mar 21 06:56:52 2010 +++ src/sys/modules/Makefile.inc Sun Aug 28 15:40:50 2011 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile.inc,v 1.3 2010/03/21 06:56:52 pooka Exp $ +# $NetBSD: Makefile.inc,v 1.4 2011/08/28 15:40:50 jmcneill Exp $ S!= cd ${.PARSEDIR}/..;pwd CPPFLAGS+= -I${NETBSDSRCDIR}/common/include USE_FORT= no -WARNS?= 1 +WARNS?= 3 .if !empty(IOCONF) _BSD_IOCONF_MK_USER_=1 Index: src/sys/modules/azalia/Makefile diff -u src/sys/modules/azalia/Makefile:1.1 src/sys/modules/azalia/Makefile:1.2 --- src/sys/modules/azalia/Makefile:1.1 Mon Jun 2 11:34:07 2008 +++ src/sys/modules/azalia/Makefile Sun Aug 28 15:40:50 2011 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2008/06/02 11:34:07 jmcneill Exp $ +# $NetBSD: Makefile,v 1.2 2011/08/28 15:40:50 jmcneill Exp $ .include "../Makefile.inc" .PATH: ${S}/dev/pci KMOD= azalia +IOCONF= azalia.ioconf SRCS= azalia.c SRCS+= azalia_codec.c Index: src/sys/modules/i915drm/Makefile diff -u src/sys/modules/i915drm/Makefile:1.5 src/sys/modules/i915drm/Makefile:1.6 --- src/sys/modules/i915drm/Makefile:1.5 Mon Jun 22 15:34:53 2009 +++ src/sys/modules/i915drm/Makefile Sun Aug 28 15:40:50 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2009/06/22 15:34:53 mrg Exp $ +# $NetBSD: Makefile,v 1.6 2011/08/28 15:40:50 jmcneill Exp $ .include "../Makefile.inc" @@ -6,6 +6,7 @@ .PATH: ${S}/external/bsd/drm/dist/shared-core KMOD= i915drm +IOCONF= i915drm.ioconf SRCS= i915_drv.c SRCS+= i915_dma.c Index: src/sys/modules/pf/Makefile diff -u src/sys/modules/pf/Makefile:1.1 src/sys/modules/pf/Makefile:1.2 --- src/sys/modules/pf/Makefile:1.1 Mon Apr 12 14:05:38 2010 +++ src/sys/modules/pf/Makefile Sun Aug 28 15:40:50 2011 @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2010/04/12 14:05:38 ahoka Exp $ +# $NetBSD: Makefile,v 1.2 2011/08/28 15:40:50 jmcneill Exp $ .include "../Makefile.inc" .PATH: ${S}/dist/pf/net ${S}/dist/pf/netinet KMOD= pf +WARNS= 1 SRCS= if_compat.c SRCS+= if_pflog.c Index: src/sys/modules/radeondrm/Makefile diff -u src/sys/modules/radeondrm/Makefile:1.8 src/sys/modules/radeondrm/Makefile:1.9 --- src/sys/modules/radeondrm/Makefile:1.8 Thu May 27 07:27:35 2010 +++ src/sys/modules/radeondrm/Makefile Sun Aug 28 15:40:50 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2010/05/27 07:27:35 mrg Exp $ +# $NetBSD: Makefile,v 1.9 2011/08/28 15:40:50 jmcneill Exp $ .include "../Makefile.inc" @@ -6,6 +6,7 @@ .PATH: ${S}/external/bsd/drm/dist/shared-core KMOD= radeondrm +IOCONF= radeondrm.ioconf SRCS= radeon_drv.c # XXX this one should be in a sub-driver to share with r128drm Added files: Index: src/sys/modules/azalia/azalia.ioconf diff -u /dev/null src/sys/modules/azalia/azalia.ioconf:1.1 --- /dev/null Sun Aug 28 15:40:51 2011 +++ src/sys/modules/azalia/azalia.ioconf Sun Aug 28 15:40:50 2011 @@ -0,0 +1,10 @@ +# $NetBSD: azalia.ioconf,v 1.1 2011/08/28 15:40:50 jmcneill Exp $ + +ioconf azalia + +include "conf/files" +include "dev/pci/files.pci" + +pseudo-root pci* + +azalia* at pci? dev ? function ? Index: src/sys/modules/i915drm/i915drm.ioconf diff -u /dev/null src/sys/modules/i915drm/i915drm.ioconf:1.1 --- /dev/null Sun Aug 28 15:40:51 2011 +++ src/sys/modules/i915drm/i915drm.ioconf Sun Aug 28 15:40:50 2011 @@ -0,0 +1,9 @@ +# $NetBSD: i915drm.ioconf,v 1.1 2011/08/28 15:40:50 jmcneill Exp $ + +ioconf i915drm + +include "conf/files" + +pseudo-root drm* + +i915drm* at drm? Index: src/sys/modules/radeondrm/radeondrm.ioconf diff -u /dev/null src/sys/modules/radeondrm/radeondrm.ioconf:1.1 --- /dev/null Sun Aug 28 15:40:51 2011 +++ src/sys/modules/radeondrm/radeondrm.ioconf Sun Aug 28 15:40:50 2011 @@ -0,0 +1,9 @@ +# $NetBSD: radeondrm.ioconf,v 1.1 2011/08/28 15:40:50 jmcneill Exp $ + +ioconf radeondrm + +include "conf/files" + +pseudo-root drm* + +radeondrm* at drm?