diff options
author | phk <phk@FreeBSD.org> | 2004-02-21 21:10:55 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-02-21 21:10:55 +0000 |
commit | ad925439e08646e188eb1c0e0be355f0685c8739 (patch) | |
tree | 0896a7d99c90ad922a1e4b41f052d155256cb97e /sys/i386 | |
parent | d68e8ba04cb070f349043edccaafae5facffab48 (diff) | |
download | FreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.zip FreeBSD-src-ad925439e08646e188eb1c0e0be355f0685c8739.tar.gz |
Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.
Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/acpica/acpi_machdep.c | 2 | ||||
-rw-r--r-- | sys/i386/bios/apm.c | 2 | ||||
-rw-r--r-- | sys/i386/bios/smapi.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/elan-mmcr.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/mem.c | 3 | ||||
-rw-r--r-- | sys/i386/i386/perfmon.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/asc.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/ctx.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/cy.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/gpib.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/gsc.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/istallion.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/mse.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/pcvt/pcvt_drv.c | 4 | ||||
-rw-r--r-- | sys/i386/isa/spic.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/spigot.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/spkr.c | 2 | ||||
-rw-r--r-- | sys/i386/isa/stallion.c | 3 | ||||
-rw-r--r-- | sys/i386/isa/wt.c | 2 |
19 files changed, 38 insertions, 7 deletions
diff --git a/sys/i386/acpica/acpi_machdep.c b/sys/i386/acpica/acpi_machdep.c index a6c186a..5d4f0a4 100644 --- a/sys/i386/acpica/acpi_machdep.c +++ b/sys/i386/acpica/acpi_machdep.c @@ -73,6 +73,8 @@ static d_ioctl_t apmioctl; static d_poll_t apmpoll; static struct cdevsw apm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = apmopen, .d_close = apmclose, .d_write = apmwrite, diff --git a/sys/i386/bios/apm.c b/sys/i386/bios/apm.c index 1e2371f..6145d9f 100644 --- a/sys/i386/bios/apm.c +++ b/sys/i386/bios/apm.c @@ -108,6 +108,8 @@ static d_ioctl_t apmioctl; static d_poll_t apmpoll; static struct cdevsw apm_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = apmopen, .d_close = apmclose, .d_write = apmwrite, diff --git a/sys/i386/bios/smapi.c b/sys/i386/bios/smapi.c index 200bcfc..3e9aab8 100644 --- a/sys/i386/bios/smapi.c +++ b/sys/i386/bios/smapi.c @@ -75,9 +75,10 @@ devclass_t smapi_devclass; static d_ioctl_t smapi_ioctl; static struct cdevsw smapi_cdevsw = { + .d_version = D_VERSION, .d_ioctl = smapi_ioctl, .d_name = "smapi", - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; static void smapi_identify (driver_t *, device_t); diff --git a/sys/i386/i386/elan-mmcr.c b/sys/i386/i386/elan-mmcr.c index 9e3de8f..80d8759 100644 --- a/sys/i386/i386/elan-mmcr.c +++ b/sys/i386/i386/elan-mmcr.c @@ -327,6 +327,8 @@ static d_ioctl_t elan_ioctl; static d_mmap_t elan_mmap; static struct cdevsw elan_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_ioctl = elan_ioctl, .d_mmap = elan_mmap, .d_name = "elan", diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 8501167..342ced5 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -80,6 +80,7 @@ static d_mmap_t memmmap; #define CDEV_MAJOR 2 static struct cdevsw mem_cdevsw = { + .d_version = D_VERSION, .d_open = mmopen, .d_close = mmclose, .d_read = mmrw, @@ -88,7 +89,7 @@ static struct cdevsw mem_cdevsw = { .d_mmap = memmmap, .d_name = "mem", .d_maj = CDEV_MAJOR, - .d_flags = D_MEM, + .d_flags = D_MEM | D_NEEDGIANT, }; MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); diff --git a/sys/i386/i386/perfmon.c b/sys/i386/i386/perfmon.c index 3b765f4..eaccb5a 100644 --- a/sys/i386/i386/perfmon.c +++ b/sys/i386/i386/perfmon.c @@ -72,6 +72,8 @@ static void perfmon_init_dev(void *); SYSINIT(cpu, SI_SUB_DRIVERS, SI_ORDER_ANY, perfmon_init_dev, NULL); static struct cdevsw perfmon_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = perfmon_open, .d_close = perfmon_close, .d_ioctl = perfmon_ioctl, diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index 8aff8c1..140ae5a 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -197,6 +197,8 @@ static d_poll_t ascpoll; static struct cdevsw asc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ascopen, .d_close = ascclose, .d_read = ascread, diff --git a/sys/i386/isa/ctx.c b/sys/i386/isa/ctx.c index 28adedc..5d18a7b 100644 --- a/sys/i386/isa/ctx.c +++ b/sys/i386/isa/ctx.c @@ -143,6 +143,8 @@ static d_write_t ctxwrite; static d_ioctl_t ctxioctl; static struct cdevsw ctx_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = ctxopen, .d_close = ctxclose, .d_read = ctxread, diff --git a/sys/i386/isa/cy.c b/sys/i386/isa/cy.c index 2a715c0..7207846 100644 --- a/sys/i386/isa/cy.c +++ b/sys/i386/isa/cy.c @@ -386,12 +386,13 @@ static d_write_t siowrite; static d_ioctl_t sioioctl; static struct cdevsw sio_cdevsw = { + .d_version = D_VERSION, .d_open = sioopen, .d_close = sioclose, .d_write = siowrite, .d_ioctl = sioioctl, .d_name = driver_name, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int comconsole = -1; diff --git a/sys/i386/isa/gpib.c b/sys/i386/isa/gpib.c index 480448a..0a653fe 100644 --- a/sys/i386/isa/gpib.c +++ b/sys/i386/isa/gpib.c @@ -73,6 +73,8 @@ static d_write_t gpwrite; static d_ioctl_t gpioctl; static struct cdevsw gp_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = gpopen, .d_close = gpclose, .d_write = gpwrite, diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c index d4dff76..6cd1122 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -192,6 +192,8 @@ static d_read_t gscread; static d_ioctl_t gscioctl; static struct cdevsw gsc_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = gscopen, .d_close = gscclose, .d_read = gscread, diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index ee82892..f6f10b1 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -643,13 +643,14 @@ COMPAT_ISA_DRIVER(stli, stlidriver); */ static struct cdevsw stli_cdevsw = { + .d_version = D_VERSION, .d_open = stliopen, .d_close = stliclose, .d_read = stliread, .d_write = stliwrite, .d_ioctl = stliioctl, .d_name = stli_drvname, - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; #endif diff --git a/sys/i386/isa/mse.c b/sys/i386/isa/mse.c index b2c821b..8cd40f1 100644 --- a/sys/i386/isa/mse.c +++ b/sys/i386/isa/mse.c @@ -140,6 +140,8 @@ static d_ioctl_t mseioctl; static d_poll_t msepoll; static struct cdevsw mse_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = mseopen, .d_close = mseclose, .d_read = mseread, diff --git a/sys/i386/isa/pcvt/pcvt_drv.c b/sys/i386/isa/pcvt/pcvt_drv.c index af16af9..0b4fdc0 100644 --- a/sys/i386/isa/pcvt/pcvt_drv.c +++ b/sys/i386/isa/pcvt/pcvt_drv.c @@ -93,14 +93,14 @@ static d_close_t pcvt_close; static d_ioctl_t pcvt_ioctl; static d_mmap_t pcvt_mmap; - static struct cdevsw vt_cdevsw = { + .d_version = D_VERSION, .d_open = pcvt_open, .d_close = pcvt_close, .d_ioctl = pcvt_ioctl, .d_mmap = pcvt_mmap, .d_name = "vt", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; static int pcvt_probe(device_t dev); diff --git a/sys/i386/isa/spic.c b/sys/i386/isa/spic.c index e73b8b6..a649f13 100644 --- a/sys/i386/isa/spic.c +++ b/sys/i386/isa/spic.c @@ -85,6 +85,8 @@ static d_ioctl_t spicioctl; static d_poll_t spicpoll; static struct cdevsw spic_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = spicopen, .d_close = spicclose, .d_read = spicread, diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c index dd23abd..b94233a 100644 --- a/sys/i386/isa/spigot.c +++ b/sys/i386/isa/spigot.c @@ -105,6 +105,8 @@ static d_ioctl_t spigot_ioctl; static d_mmap_t spigot_mmap; static struct cdevsw spigot_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = spigot_open, .d_close = spigot_close, .d_read = spigot_read, diff --git a/sys/i386/isa/spkr.c b/sys/i386/isa/spkr.c index e82ef46..e73ab8d 100644 --- a/sys/i386/isa/spkr.c +++ b/sys/i386/isa/spkr.c @@ -34,6 +34,8 @@ static d_write_t spkrwrite; static d_ioctl_t spkrioctl; static struct cdevsw spkr_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = spkropen, .d_close = spkrclose, .d_write = spkrwrite, diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c index de0b2cc..9a99f74 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -537,11 +537,12 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver); */ static struct cdevsw stl_cdevsw = { + .d_version = D_VERSION, .d_open = stlopen, .d_close = stlclose, .d_ioctl = stlioctl, .d_name = "stl", - .d_flags = D_TTY, + .d_flags = D_TTY | D_NEEDGIANT, }; #endif diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c index 941fc08..9ca1e25 100644 --- a/sys/i386/isa/wt.c +++ b/sys/i386/isa/wt.c @@ -186,6 +186,8 @@ static d_strategy_t wtstrategy; static struct cdevsw wt_cdevsw = { + .d_version = D_VERSION, + .d_flags = D_NEEDGIANT, .d_open = wtopen, .d_close = wtclose, .d_read = physread, |