Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/prg-localcount2]: src Add DEVSW_MODULE_INIT to existing device-driver mo...
details: https://anonhg.NetBSD.org/src/rev/2df050bf18b4
branches: prg-localcount2
changeset: 823523:2df050bf18b4
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sat Apr 29 09:17:58 2017 +0000
description:
Add DEVSW_MODULE_INIT to existing device-driver modules, so that they
willl have a localcount defined and thus be permitted to load. Without
a localcount, loading the module will return EINVAL.
XXX the dtrace and drm stuff might need to be fed back upstream?
diffstat:
external/cddl/osnet/dev/fbt/fbt.c | 8 +++++++-
external/cddl/osnet/dev/sdt/sdt.c | 8 +++++++-
external/cddl/osnet/dist/uts/common/dtrace/dtrace.c | 6 ++++++
sys/coda/coda_psdev.c | 6 ++++--
sys/dev/ccd.c | 7 +++++--
sys/dev/clockctl.c | 6 ++++--
sys/dev/filemon/filemon.c | 6 ++++--
sys/dev/flash/flash.c | 7 +++++--
sys/dev/gpio/gpio.c | 6 ++++--
sys/dev/hdaudio/hdaudio.c | 6 ++++--
sys/dev/i2c/i2c.c | 6 ++++--
sys/dev/onewire/onewire.c | 6 ++++--
sys/dev/spkr.c | 6 ++++--
sys/dev/tprof/tprof.c | 6 ++++--
sys/dist/pf/net/pf_ioctl.c | 6 ++++--
sys/external/bsd/drm/dist/bsd-core/drm_drv.c | 2 ++
sys/external/bsd/drm2/drm/drm_drv.c | 6 ++++--
sys/external/bsd/ipf/netinet/ip_fil_netbsd.c | 9 ++++++---
sys/modules/lua/lua.c | 4 +++-
sys/net/if_srt.c | 6 ++++--
20 files changed, 89 insertions(+), 34 deletions(-)
diffs (truncated from 637 to 300 lines):
diff -r e6c2efba0a7c -r 2df050bf18b4 external/cddl/osnet/dev/fbt/fbt.c
--- a/external/cddl/osnet/dev/fbt/fbt.c Sat Apr 29 08:55:37 2017 +0000
+++ b/external/cddl/osnet/dev/fbt/fbt.c Sat Apr 29 09:17:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fbt.c,v 1.22 2017/02/27 06:47:00 chs Exp $ */
+/* $NetBSD: fbt.c,v 1.22.2.1 2017/04/29 09:17:58 pgoyette Exp $ */
/*
* CDDL HEADER START
@@ -35,6 +35,9 @@
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
+#ifdef __NetBSD
+#include <sys/localcount.h>
+#endif
#include <sys/conf.h>
#include <sys/cpuvar.h>
#include <sys/fcntl.h>
@@ -152,6 +155,9 @@
#define FBT_PROBETAB_SIZE 0x8000 /* 32k entries -- 128K total */
static const struct cdevsw fbt_cdevsw = {
+#ifdef __NetBSD__
+ DEVSW_MODULE_INIT
+#endif
.d_open = fbt_open,
.d_close = noclose,
.d_read = noread,
diff -r e6c2efba0a7c -r 2df050bf18b4 external/cddl/osnet/dev/sdt/sdt.c
--- a/external/cddl/osnet/dev/sdt/sdt.c Sat Apr 29 08:55:37 2017 +0000
+++ b/external/cddl/osnet/dev/sdt/sdt.c Sat Apr 29 09:17:58 2017 +0000
@@ -39,12 +39,15 @@
* unloaded; in particular, probes may not span multiple kernel modules.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.18 2017/01/07 21:39:52 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdt.c,v 1.18.4.1 2017/04/29 09:17:58 pgoyette Exp $");
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
+#ifdef __NetBSD__
+#include <sys/localcount.h>
+#endif
#include <sys/conf.h>
#ifdef __FreeBSD__
#include <sys/eventhandler.h>
@@ -119,6 +122,9 @@
}
static const struct cdevsw sdt_cdevsw = {
+#ifdef __NetBSD__
+ DEVSW_MODULE_INIT
+#endif
.d_open = sdt_open,
.d_close = noclose,
.d_read = noread,
diff -r e6c2efba0a7c -r 2df050bf18b4 external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
--- a/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Sat Apr 29 08:55:37 2017 +0000
+++ b/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c Sat Apr 29 09:17:58 2017 +0000
@@ -78,6 +78,9 @@
#include <sys/time.h>
#endif
#include <sys/stat.h>
+#ifdef __NetBSD__
+#include <sys/localcount.h>
+#endif
#include <sys/conf.h>
#include <sys/systm.h>
#if defined(sun)
@@ -15338,6 +15341,9 @@
/* Pseudo Device Entry points */
/* Just opens, clones to the fileops below */
const struct cdevsw dtrace_cdevsw = {
+#ifdef __NetBSD__
+ DEVSW_MODULE_INIT
+#endif
.d_open = dtrace_open,
.d_close = noclose,
.d_read = noread,
diff -r e6c2efba0a7c -r 2df050bf18b4 sys/coda/coda_psdev.c
--- a/sys/coda/coda_psdev.c Sat Apr 29 08:55:37 2017 +0000
+++ b/sys/coda/coda_psdev.c Sat Apr 29 09:17:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: coda_psdev.c,v 1.57 2016/07/07 06:55:40 msaitoh Exp $ */
+/* $NetBSD: coda_psdev.c,v 1.57.8.1 2017/04/29 09:17:58 pgoyette Exp $ */
/*
*
@@ -54,7 +54,7 @@
/* These routines are the device entry points for Venus. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.57 2016/07/07 06:55:40 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: coda_psdev.c,v 1.57.8.1 2017/04/29 09:17:58 pgoyette Exp $");
extern int coda_nc_initialized; /* Set if cache has been initialized */
@@ -68,6 +68,7 @@
#include <sys/ioctl.h>
#include <sys/poll.h>
#include <sys/select.h>
+#include <sys/localcount.h>
#include <sys/conf.h>
#include <sys/atomic.h>
#include <sys/module.h>
@@ -103,6 +104,7 @@
dev_type_kqfilter(vc_nb_kqfilter);
const struct cdevsw vcoda_cdevsw = {
+ DEVSW_MODULE_INIT
.d_open = vc_nb_open,
.d_close = vc_nb_close,
.d_read = vc_nb_read,
diff -r e6c2efba0a7c -r 2df050bf18b4 sys/dev/ccd.c
--- a/sys/dev/ccd.c Sat Apr 29 08:55:37 2017 +0000
+++ b/sys/dev/ccd.c Sat Apr 29 09:17:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ccd.c,v 1.171 2017/04/05 18:34:56 jdolecek Exp $ */
+/* $NetBSD: ccd.c,v 1.171.4.1 2017/04/29 09:17:58 pgoyette Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc.
@@ -88,7 +88,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.171 2017/04/05 18:34:56 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.171.4.1 2017/04/29 09:17:58 pgoyette Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -105,6 +105,7 @@
#include <sys/module.h>
#include <sys/namei.h>
#include <sys/stat.h>
+#include <sys/localcount.h>
#include <sys/ioctl.h>
#include <sys/disklabel.h>
#include <sys/device.h>
@@ -187,6 +188,7 @@
static dev_type_size(ccdsize);
const struct bdevsw ccd_bdevsw = {
+ DEVSW_MODULE_INIT
.d_open = ccdopen,
.d_close = ccdclose,
.d_strategy = ccdstrategy,
@@ -198,6 +200,7 @@
};
const struct cdevsw ccd_cdevsw = {
+ DEVSW_MODULE_INIT
.d_open = ccdopen,
.d_close = ccdclose,
.d_read = ccdread,
diff -r e6c2efba0a7c -r 2df050bf18b4 sys/dev/clockctl.c
--- a/sys/dev/clockctl.c Sat Apr 29 08:55:37 2017 +0000
+++ b/sys/dev/clockctl.c Sat Apr 29 09:17:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clockctl.c,v 1.35.6.1 2017/04/27 05:36:35 pgoyette Exp $ */
+/* $NetBSD: clockctl.c,v 1.35.6.2 2017/04/29 09:17:58 pgoyette Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clockctl.c,v 1.35.6.1 2017/04/27 05:36:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clockctl.c,v 1.35.6.2 2017/04/29 09:17:58 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_ntp.h"
@@ -43,6 +43,7 @@
#include <sys/proc.h>
#include <sys/errno.h>
#include <sys/ioctl.h>
+#include <sys/localcount.h>
#include <sys/device.h>
#include <sys/time.h>
#include <sys/conf.h>
@@ -67,6 +68,7 @@
dev_type_ioctl(clockctlioctl);
const struct cdevsw clockctl_cdevsw = {
+ DEVSW_MODULE_INIT
.d_open = clockctlopen,
.d_close = clockctlclose,
.d_read = noread,
diff -r e6c2efba0a7c -r 2df050bf18b4 sys/dev/filemon/filemon.c
--- a/sys/dev/filemon/filemon.c Sat Apr 29 08:55:37 2017 +0000
+++ b/sys/dev/filemon/filemon.c Sat Apr 29 09:17:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: filemon.c,v 1.28 2016/01/11 01:37:36 pgoyette Exp $ */
+/* $NetBSD: filemon.c,v 1.28.8.1 2017/04/29 09:17:58 pgoyette Exp $ */
/*
* Copyright (c) 2010, Juniper Networks, Inc.
*
@@ -25,11 +25,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.28 2016/01/11 01:37:36 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: filemon.c,v 1.28.8.1 2017/04/29 09:17:58 pgoyette Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/module.h>
+#include <sys/localcount.h>
#include <sys/conf.h>
#include <sys/file.h>
#include <sys/filedesc.h>
@@ -52,6 +53,7 @@
static dev_type_open(filemon_open);
struct cdevsw filemon_cdevsw = {
+ DEVSW_MODULE_INIT
.d_open = filemon_open,
.d_close = noclose,
.d_read = noread,
diff -r e6c2efba0a7c -r 2df050bf18b4 sys/dev/flash/flash.c
--- a/sys/dev/flash/flash.c Sat Apr 29 08:55:37 2017 +0000
+++ b/sys/dev/flash/flash.c Sat Apr 29 09:17:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: flash.c,v 1.12 2014/07/25 08:10:36 dholland Exp $ */
+/* $NetBSD: flash.c,v 1.12.18.1 2017/04/29 09:17:59 pgoyette Exp $ */
/*-
* Copyright (c) 2011 Department of Software Engineering,
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.12 2014/07/25 08:10:36 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash.c,v 1.12.18.1 2017/04/29 09:17:59 pgoyette Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -45,6 +45,7 @@
#include <sys/errno.h>
#include <sys/ioctl.h>
#include <sys/device.h>
+#include <sys/localcount.h>
#include <sys/conf.h>
#include <sys/kmem.h>
#include <sys/uio.h>
@@ -92,6 +93,7 @@
* Block device's operation
*/
const struct bdevsw flash_bdevsw = {
+ DEVSW_MODULE_INIT
.d_open = flashopen,
.d_close = flashclose,
.d_strategy = flashstrategy,
@@ -106,6 +108,7 @@
* Character device's operations
*/
const struct cdevsw flash_cdevsw = {
+ DEVSW_MODULE_INIT
.d_open = flashopen,
.d_close = flashclose,
.d_read = flashread,
diff -r e6c2efba0a7c -r 2df050bf18b4 sys/dev/gpio/gpio.c
--- a/sys/dev/gpio/gpio.c Sat Apr 29 08:55:37 2017 +0000
+++ b/sys/dev/gpio/gpio.c Sat Apr 29 09:17:58 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gpio.c,v 1.58 2016/05/11 18:33:40 bouyer Exp $ */
+/* $NetBSD: gpio.c,v 1.58.8.1 2017/04/29 09:17:59 pgoyette Exp $ */
/* $OpenBSD: gpio.c,v 1.6 2006/01/14 12:33:49 grange Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.58 2016/05/11 18:33:40 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gpio.c,v 1.58.8.1 2017/04/29 09:17:59 pgoyette Exp $");
/*
* General Purpose Input/Output framework.
@@ -28,6 +28,7 @@
#include <sys/param.h>
#include <sys/callout.h>
#include <sys/systm.h>
+#include <sys/localcount.h>
#include <sys/conf.h>
#include <sys/device.h>
#include <sys/fcntl.h>
@@ -100,6 +101,7 @@
dev_type_ioctl(gpioioctl_locked);
const struct cdevsw gpio_cdevsw = {
+ DEVSW_MODULE_INIT
.d_open = gpioopen,
.d_close = gpioclose,
.d_read = noread,
diff -r e6c2efba0a7c -r 2df050bf18b4 sys/dev/hdaudio/hdaudio.c
Home |
Main Index |
Thread Index |
Old Index