The NetBSD Project

CVS log for src/sys/kern/subr_devsw.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / kern

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.51 / (download) - annotate - [select for diffs], Wed Feb 15 13:12:45 2023 UTC (12 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, HEAD
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored)

kern/subr_devsw.c: Nix trailing whitespace.

No functional change intended.

Please do (setq show-trailing-whitespace t) if you use Emacs!

Maybe someone should teach nvi to do something similar.

Revision 1.38.8.1 / (download) - annotate - [select for diffs], Tue Feb 14 16:19:00 2023 UTC (12 months, 2 weeks ago) by martin
Branch: netbsd-9
Changes since 1.38: +3 -3 lines
Diff to previous 1.38 (colored) next main 1.39 (colored)

Pull up following revision(s) (requested by buhrow in ticket #1595):

	sys/kern/subr_devsw.c: revision 1.50

        When a device driver calls devsw_attach() it has the option of attaching a block device
structure and a character device structure, or, just the character device structure.
With the existing code, if a driver elects not to attach a block device structure and if it
asks for a major number to be dynamically assigned to its character interface,
that driver will not be able to detach and reattach its character driver interface.  This is a very
long standing bug which didn't come to light until we began using loadable kernel modules more
heavily.  this patch fixes this problem.  With this patch in place, drivers that implement only
a character device interface may detach and reattach that character interface as often as they
need to.

Fixes PR kern/57229

Revision 1.49.2.1 / (download) - annotate - [select for diffs], Tue Feb 14 16:16:30 2023 UTC (12 months, 2 weeks ago) by martin
Branch: netbsd-10
CVS Tags: netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored) next main 1.50 (colored)

Pull up following revision(s) (requested by buhrow in ticket #84):

	sys/kern/subr_devsw.c: revision 1.50

        When a device driver calls devsw_attach() it has the option of attaching a block device
structure and a character device structure, or, just the character device structure.
With the existing code, if a driver elects not to attach a block device structure and if it
asks for a major number to be dynamically assigned to its character interface,
that driver will not be able to detach and reattach its character driver interface.  This is a very
long standing bug which didn't come to light until we began using loadable kernel modules more
heavily.  this patch fixes this problem.  With this patch in place, drivers that implement only
a character device interface may detach and reattach that character interface as often as they
need to.

Fixes PR kern/57229

Revision 1.50 / (download) - annotate - [select for diffs], Mon Feb 13 19:07:14 2023 UTC (12 months, 2 weeks ago) by buhrow
Branch: MAIN
Changes since 1.49: +3 -3 lines
Diff to previous 1.49 (colored)


	When a device driver calls devsw_attach() it has the option of attaching a block device
structure and a character device structure, or, just the character device structure.
With the existing code, if a driver elects not to attach a block device structure and if it
asks for a major number to be dynamically assigned to its character interface,
that driver will not be able to detach and reattach its character driver interface.  This is a very
long standing bug which didn't come to light until we began using loadable kernel modules more
heavily.  this patch fixes this problem.  With this patch in place, drivers that implement only
a character device interface may detach and reattach that character interface as often as they
need to.

Fixes PR kern/57229

Revision 1.49 / (download) - annotate - [select for diffs], Sat Oct 29 10:52:36 2022 UTC (16 months ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base
Branch point for: netbsd-10
Changes since 1.48: +290 -4 lines
Diff to previous 1.48 (colored)

devsw(9): Sprinkle dtrace probes on bdevsw, cdevsw calls.

This is better than fbt-tracing the bdev_* and cdev_* functions
because this way we can reliably get at the struct bdevsw/cdevsw
pointer after lookup and get at return values.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Aug 28 12:24:39 2022 UTC (18 months ago) by riastradh
Branch: MAIN
CVS Tags: bouyer-sunxi-drm-base, bouyer-sunxi-drm
Changes since 1.47: +3 -3 lines
Diff to previous 1.47 (colored)

devsw(9): Clarify to match loop condition.  NFCI.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Aug 28 11:17:38 2022 UTC (18 months ago) by riastradh
Branch: MAIN
Changes since 1.46: +5 -3 lines
Diff to previous 1.46 (colored)

devsw(9): Fix case of existing conv in devsw_attach.

- Fix sense of conditional: if we found a conv, i < max_devsw_convs.
- Make sure to initialize error on the way out.

PR kern/56962: Incorrect behavior of the devsw_attach function

Revision 1.46 / (download) - annotate - [select for diffs], Sat Jul 9 10:30:27 2022 UTC (19 months, 3 weeks ago) by riastradh
Branch: MAIN
Changes since 1.45: +28 -3 lines
Diff to previous 1.45 (colored)

devsw(9): Forbid extant linked autoconf instances in devsw_detach.

Revision 1.45 / (download) - annotate - [select for diffs], Mon Mar 28 12:41:17 2022 UTC (23 months ago) by riastradh
Branch: MAIN
Changes since 1.44: +67 -69 lines
Diff to previous 1.44 (colored)

subr_devsw.c: KNF and style nits.

No functional change intended.

Revision 1.44 / (download) - annotate - [select for diffs], Mon Mar 28 12:39:10 2022 UTC (23 months ago) by riastradh
Branch: MAIN
Changes since 1.43: +38 -2 lines
Diff to previous 1.43 (colored)

driver(9): New devsw d_cancel op to interrupt I/O before close.

If specified, when revoking a device node or closing its last open
node, specfs will:

1. Call d_cancel, which should return promptly without blocking.
2. Wait for all concurrent d_read/write/ioctl/&c. to drain.
3. Call d_close.

Otherwise, specfs will:

1. Call d_close.
2. Wait for all concurrent d_read/write/ioctl/&c. to drain.

This fallback is problematic because often parts of d_close rely on
concurrent devsw operations to have completed already, so it is up to
each driver to have its own mechanism for waiting, and the extra step
in (2) is almost redundant.  But it is still important to ensure that
devsw operations are not active by the time a module tries to invoke
devsw_detach, because only d_open is protected against that.

The signature of d_cancel matches d_close, mostly so we don't raise
questions about `why is this different?'; the lwp argument is not
useful but we should remove it from open/cancel/close all at the same
time.

The only way d_cancel should fail, if it does at all, is with ENODEV,
meaning the driver doesn't support cancelling outstanding I/O, and
will take responsibility for that in d_close.  I would make it return
void and only have bdev_cancel and cdev_cancel possibly return ENODEV
so specfs can detect whether a driver supports it, but this would
break the pattern around devsw operation types.

Drivers are allowed to omit it from struct bdevsw, struct cdevsw --
if so, it is as if they used a function that just returns ENODEV.

XXX kernel ABI change to struct bdevsw/cdevsw requires bump

Revision 1.43 / (download) - annotate - [select for diffs], Mon Mar 28 12:38:33 2022 UTC (23 months ago) by riastradh
Branch: MAIN
Changes since 1.42: +38 -2 lines
Diff to previous 1.42 (colored)

driver(9): Make vdevgone call config_detach_commit if appropriate.

Make sure to do this before spec_node_lookup_by_dev -- that might wait
for a concurrent revoke to complete, which in turn might wait for a
concurrent open to complete, which in turn might be waiting for the
device to commit to detaching.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Mar 28 12:34:08 2022 UTC (23 months ago) by riastradh
Branch: MAIN
Changes since 1.41: +17 -2 lines
Diff to previous 1.41 (colored)

driver(9): New function dev_minor_unit.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Mar 28 12:33:50 2022 UTC (23 months ago) by riastradh
Branch: MAIN
Changes since 1.40: +49 -4 lines
Diff to previous 1.40 (colored)

driver(9): New devsw members d_cfdriver, d_devtounit.

If set, then bdev_open/cdev_open will use d_devtounit to map the
dev_t to an autoconf instance (e.g., /dev/wd0a -> wd0) and hold a
reference with device_lookup_acquire across the call to d_open.

This guarantees that the autoconf instance cannot be detached while
the devsw's d_open function is trying to open it (and also that the
autoconf instance has finished *_attach before anyone can open it).

Of course, if the underlying hardware has gone away, there will be
I/O errors, but this avoids software synchronization bugs between
open and detach for drivers that opt into it.  It's up to the driver
and bus to figure out how to deal with I/O errors from operations on
hardware that has gone away while the software hasn't finished
notifying everything that it's gone yet.

XXX kernel ABI change to struct bdevsw/cdevsw requires bump

Revision 1.40 / (download) - annotate - [select for diffs], Mon Mar 28 12:33:32 2022 UTC (23 months ago) by riastradh
Branch: MAIN
Changes since 1.39: +248 -56 lines
Diff to previous 1.39 (colored)

driver(9): Fix synchronization of devsw_attach/lookup/detach.

(`dev' means either `bdev' or `cdev' for brevity here, e.g. in
`devsw_lookup' (bdevsw_lookup, cdevsw_lookup), `dev_open' (bdev_open,
cdev_open), `maxdevsws', &c., except for `devsw_attach' and
`devsw_detach' which are taken literally.)

- Use atomic_store_release and atomic_load_consume for devsw and
  tables and their entries, which are read unlocked and thus require
  memory barriers to ensure ordering between initialization in
  devsw_attach and use in dev_lookup.

- Use pserialize(9) and localcount(9) to synchronize dev_open and
  devsw_detach.

  => Driver must ensure d_open fails and all open instances have been
     closed by the time it calls devsw_detach.

  => Bonus: dev_open is no longer globally serialized through
     device_lock.

- Use atomic_store_release and atomic_load_acquire for max_devsws,
  which is used in conditionals in the new devsw_lookup_acquire.

  => It is safe to use atomic_load_relaxed in devsw_lookup because
     the caller must guarantee the entry is stable, so any increase
     of max_devsws must have already happened.

  => devsw_lookup and devsw_lookup_acquire assume that max_devsws
     never goes down.  If you change this you must find some way to
     adapt the users, preferably without adding much overhead so that
     devsw operations are cheap.

This change introduces an auxiliary table devswref mapping device
majors to localcounts of opens in progress.  The auxiliary table only
occupies one pointer's worth of memory in a monolithic kernel, and is
allocated on the fly for dynamically loaded modules.  We could ask
the module itself to reserve storage for it, but I don't see much
value in that, and it would require some changes to the ABI and to
config(8).

- Omit needless boolean indirection.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Mar 28 12:33:22 2022 UTC (23 months ago) by riastradh
Branch: MAIN
Changes since 1.38: +3 -4 lines
Diff to previous 1.38 (colored)

driver(9): devsw_detach never fails.  Make it return void.

Prune a whole lotta dead branches as a result of this.  (Some logic
calling this is also wrong for other reasons; devsw_detach is final
-- you should never have any reason to decide to roll it back.  To be
cleaned up in subsequent commits...)

XXX kernel ABI change to devsw_detach signature requires bump

Revision 1.30.2.2 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (6 years, 2 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.30.2.1: +57 -18 lines
Diff to previous 1.30.2.1 (colored) to branchpoint 1.30 (colored) next main 1.31 (colored)

update from HEAD

Revision 1.38 / (download) - annotate - [select for diffs], Tue Nov 7 18:35:57 2017 UTC (6 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, thorpej-i2c-spi-conf2-base, thorpej-i2c-spi-conf2, thorpej-i2c-spi-conf-base, thorpej-i2c-spi-conf, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-futex, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: netbsd-9
Changes since 1.37: +3 -6 lines
Diff to previous 1.37 (colored)

Add two utility functions to help use kmem with strings: kmem_strdupsize,
kmem_strfree.

Revision 1.33.2.3 / (download) - annotate - [select for diffs], Mon Aug 28 17:53:07 2017 UTC (6 years, 6 months ago) by skrll
Branch: nick-nhusb
Changes since 1.33.2.2: +6 -6 lines
Diff to previous 1.33.2.2 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored)

Sync with HEAD

Revision 1.37.2.4 / (download) - annotate - [select for diffs], Wed May 17 04:33:03 2017 UTC (6 years, 9 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.37.2.3: +4 -6 lines
Diff to previous 1.37.2.3 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

Allow the argument to {b,c}devsw_release() to be NULL, and treat it as
a No-Op

Revision 1.37.2.3 / (download) - annotate - [select for diffs], Fri Apr 28 03:41:26 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.37.2.2: +9 -12 lines
Diff to previous 1.37.2.2 (colored) to branchpoint 1.37 (colored)

Use printf() instead of aprintf_normal(), fix the sense of a comparison

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Fri Apr 28 02:36:10 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.37.2.1: +26 -13 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored)

No need to panic if a modular driver doesn't include the required
localcount members in the {b,c}devsw.  Just log a console message
and return EINVAL to signal failure.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Thu Apr 27 05:36:37 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.37: +251 -38 lines
Diff to previous 1.37 (colored)

Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita.  There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.

Revision 1.34.2.18 / (download) - annotate - [select for diffs], Wed Apr 26 02:53:27 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.17: +4 -4 lines
Diff to previous 1.34.2.17 (colored) to branchpoint 1.34 (colored) next main 1.35 (colored)

Sync with HEAD

Revision 1.34.2.17 / (download) - annotate - [select for diffs], Tue Apr 25 21:53:06 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.16: +69 -32 lines
Diff to previous 1.34.2.16 (colored) to branchpoint 1.34 (colored)

Use {b,c}devsw_acquire() and {b,c}devsw_release() in the various device
acccess methods.

Revision 1.34.2.16 / (download) - annotate - [select for diffs], Tue Apr 25 21:36:41 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.15: +8 -2 lines
Diff to previous 1.34.2.15 (colored) to branchpoint 1.34 (colored)

Add membar_datadep_consumer() to {b,c}devsw_lookup() to ensure that
the devsw content is visible.

Again, thanks riastradh@

Revision 1.34.2.15 / (download) - annotate - [select for diffs], Tue Apr 25 21:31:33 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.14: +10 -8 lines
Diff to previous 1.34.2.14 (colored) to branchpoint 1.34 (colored)

Call localcount_init() before publishing the new {b,c}devsw.

Thanks to riastradh@

Revision 1.37 / (download) - annotate - [select for diffs], Tue Apr 25 08:46:38 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek
Branch point for: prg-localcount2
Changes since 1.36: +6 -6 lines
Diff to previous 1.36 (colored)

Use __func__ for routine name in printf() calls.  NFC intended.

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Sun Feb 5 13:40:56 2017 UTC (7 years ago) by skrll
Branch: nick-nhusb
Changes since 1.33.2.1: +38 -6 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored)

Sync with HEAD

Revision 1.34.2.14 / (download) - annotate - [select for diffs], Sat Jan 7 08:56:49 2017 UTC (7 years, 1 month ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.13: +34 -2 lines
Diff to previous 1.34.2.13 (colored) to branchpoint 1.34 (colored)

Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.36 / (download) - annotate - [select for diffs], Fri Dec 16 23:35:04 2016 UTC (7 years, 2 months ago) by riastradh
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, pgoyette-localcount-20170107, nick-nhusb-base-20170204, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.35: +14 -2 lines
Diff to previous 1.35 (colored)

Fix return value of nommap.

Revision 1.35 / (download) - annotate - [select for diffs], Fri Dec 9 19:13:47 2016 UTC (7 years, 2 months ago) by nat
Branch: MAIN
Changes since 1.34: +22 -2 lines
Diff to previous 1.34 (colored)

Add functions to access device flags.  This restores simultaneous audio
open/close.

OK hannken@ christos@

Revision 1.34.2.13 / (download) - annotate - [select for diffs], Fri Jul 22 23:16:36 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.12: +3 -3 lines
Diff to previous 1.34.2.12 (colored) to branchpoint 1.34 (colored)

Fix a comment

Revision 1.34.2.12 / (download) - annotate - [select for diffs], Fri Jul 22 23:04:01 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.11: +4 -4 lines
Diff to previous 1.34.2.11 (colored) to branchpoint 1.34 (colored)

Continue previous - finish what we started

Revision 1.34.2.11 / (download) - annotate - [select for diffs], Fri Jul 22 23:02:55 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.10: +4 -4 lines
Diff to previous 1.34.2.10 (colored) to branchpoint 1.34 (colored)

Only retrieve the bdev/cdev from the xdevsw[] array once.

Revision 1.34.2.10 / (download) - annotate - [select for diffs], Fri Jul 22 11:59:51 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.9: +4 -4 lines
Diff to previous 1.34.2.9 (colored) to branchpoint 1.34 (colored)

Style: indent label 'out:' one space from the margin.

Revision 1.34.2.9 / (download) - annotate - [select for diffs], Thu Jul 21 06:22:31 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.8: +2 -3 lines
Diff to previous 1.34.2.8 (colored) to branchpoint 1.34 (colored)

Remove a stray call to mutex_exit() that is left over from a previous
incarnation of this code.

Revision 1.34.2.8 / (download) - annotate - [select for diffs], Wed Jul 20 07:07:04 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.7: +7 -6 lines
Diff to previous 1.34.2.7 (colored) to branchpoint 1.34 (colored)

Improved comment.  No code change.

Revision 1.34.2.7 / (download) - annotate - [select for diffs], Sun Jul 17 21:40:47 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.6: +3 -3 lines
Diff to previous 1.34.2.6 (colored) to branchpoint 1.34 (colored)

Fix typo in KASSERTMSG macro name

Revision 1.34.2.6 / (download) - annotate - [select for diffs], Sun Jul 17 21:39:17 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.5: +10 -8 lines
Diff to previous 1.34.2.5 (colored) to branchpoint 1.34 (colored)

Instead of initializing the 'pserialize_t psz' while holding a lock,
create a new devsw_detach_init() routine to hande this, and call it
after the pserialize system has been initialized.

Revision 1.34.2.5 / (download) - annotate - [select for diffs], Sun Jul 17 12:09:21 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.4: +18 -12 lines
Diff to previous 1.34.2.4 (colored) to branchpoint 1.34 (colored)

More details in KASSERTs to aid debugging

Revision 1.34.2.4 / (download) - annotate - [select for diffs], Sun Jul 17 05:02:19 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.3: +12 -9 lines
Diff to previous 1.34.2.3 (colored) to branchpoint 1.34 (colored)

Defer initialization of the pserialize_t device_psz" until just before
we need it.  We can't initialize within devsw_init() because init_main()
has not yet initialized the pserialize stuff.

Restore a "return bdev" in bdevsw_lookup_acquire() - accidental deletion

Update cdevsw_lookup_acquire() to match bdev_lookup_acquire()

Revision 1.34.2.3 / (download) - annotate - [select for diffs], Sun Jul 17 02:37:54 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.2: +14 -11 lines
Diff to previous 1.34.2.2 (colored) to branchpoint 1.34 (colored)

More locking fixes from riastradh@

Revision 1.34.2.2 / (download) - annotate - [select for diffs], Sat Jul 16 22:35:34 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34.2.1: +79 -33 lines
Diff to previous 1.34.2.1 (colored) to branchpoint 1.34 (colored)

Fix some locking sequences.  Thanks to ristradh@ for the review!

Revision 1.34.2.1 / (download) - annotate - [select for diffs], Sat Jul 16 07:54:13 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.34: +111 -9 lines
Diff to previous 1.34 (colored)

First pass of adding localcount(9) support for devsw.  As with the
earlier autoconf changes, nothing currently uses this new feature.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Sat Mar 19 11:30:31 2016 UTC (7 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.33: +12 -2 lines
Diff to previous 1.33 (colored)

Sync with HEAD

Revision 1.34 / (download) - annotate - [select for diffs], Mon Feb 1 05:05:43 2016 UTC (8 years, 1 month ago) by riz
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.33: +12 -2 lines
Diff to previous 1.33 (colored)

Implement the 'io' provider for DTrace.  From riastradh@, with
fixes from me.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Sep 5 05:57:21 2014 UTC (9 years, 5 months ago) by matt
Branch: MAIN
CVS Tags: nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.32: +12 -12 lines
Diff to previous 1.32 (colored)

Don't next structure and enum definitions.
Don't use C++ keywords new, try, class, private, etc.

Revision 1.30.2.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:04:29 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-maxphys
Changes since 1.30: +37 -3 lines
Diff to previous 1.30 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.30.12.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:55:58 2014 UTC (9 years, 6 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.30: +37 -3 lines
Diff to previous 1.30 (colored) next main 1.31 (colored)

Rebase.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Jul 25 07:56:14 2014 UTC (9 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.31: +34 -2 lines
Diff to previous 1.31 (colored)

Add d_discard to struct bdevsw/cdevsw, and the plumbing to access it.

Unfortunately we need d_discard in both since we need to be able to
discard from both the block and character forms of disks. I'm
increasingly thinking it would be better to restructure the ops
dispatching so each type of device (ttys, disks, tapes, etc.) has its
own function table. Then we wouldn't need to change every tty driver
to add a disk op.

Revision 1.31 / (download) - annotate - [select for diffs], Sun May 25 16:31:51 2014 UTC (9 years, 9 months ago) by pooka
Branch: MAIN
Changes since 1.30: +5 -3 lines
Diff to previous 1.30 (colored)

Call biodone() in the bdev_strategy() error via a pointer.  Decouples
subr_devsw from VFS -- not that I/O buffers are _VFS_ entities -- and
eliminates the last weak alias from librump, which means things now
fully work on glibc (w/o LD_DYNAMIC_WEAK) and musl.

The whole code path is suspect anyway, since nothing prevents the device
from escaping after the lookup, suggesting that the whole error path
should be handled by the caller, but oh well.

Revision 1.28.12.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:27 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.28: +26 -2 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

sync with head

Revision 1.28.16.1 / (download) - annotate - [select for diffs], Sat Feb 18 07:35:32 2012 UTC (12 years ago) by mrg
Branch: jmcneill-usbmp
Changes since 1.28: +26 -2 lines
Diff to previous 1.28 (colored) next main 1.29 (colored)

merge to -current.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Feb 18 06:29:10 2012 UTC (12 years ago) by mrg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, rmind-smpnet-nbase, rmind-smpnet-base, rmind-smpnet, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, jmcneill-usbmp-base9, jmcneill-usbmp-base8, jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3, jmcneill-usbmp-base2, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, tls-earlyentropy
Changes since 1.29: +3 -2 lines
Diff to previous 1.29 (colored)

add an XXX comment i meant to include with the original change.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Dec 12 19:03:12 2011 UTC (12 years, 2 months ago) by mrg
Branch: MAIN
CVS Tags: netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.28: +25 -2 lines
Diff to previous 1.28 (colored)

implement bdev_size(9) wrapper around d_psize() routine, so we can take
the device lock in relevant places.  avoid doing so while actually dumping.

tested i386 crash dumps still work, and that all touched files compile.

fixes PR#45705.

Revision 1.17.4.4 / (download) - annotate - [select for diffs], Wed Sep 16 13:38:01 2009 UTC (14 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.17.4.3: +8 -4 lines
Diff to previous 1.17.4.3 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored)

sync with head

Revision 1.28 / (download) - annotate - [select for diffs], Thu Sep 3 11:42:21 2009 UTC (14 years, 5 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-nfs-mp-base9, yamt-nfs-mp-base8, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1, uebayasi-xip-base, uebayasi-xip, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, jmcneill-usbmp-base, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Branch point for: yamt-pagecache, jmcneill-usbmp
Changes since 1.27: +8 -4 lines
Diff to previous 1.27 (colored)

In bdev_strategy, return ENXIO instead of panicing if the block device has
disappeared. ok pooka@

Revision 1.17.4.3 / (download) - annotate - [select for diffs], Wed Aug 19 18:48:17 2009 UTC (14 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.17.4.2: +4 -4 lines
Diff to previous 1.17.4.2 (colored) to branchpoint 1.17 (colored)

sync with head.

Revision 1.27 / (download) - annotate - [select for diffs], Tue Aug 18 02:44:37 2009 UTC (14 years, 6 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

whitespace fixes.  no functional changes.

Revision 1.17.4.2 / (download) - annotate - [select for diffs], Mon May 4 08:13:47 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.17.4.1: +129 -75 lines
Diff to previous 1.17.4.1 (colored) to branchpoint 1.17 (colored)

sync with head.

Revision 1.22.6.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:32:56 2009 UTC (15 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.22.6.1: +95 -35 lines
Diff to previous 1.22.6.1 (colored) to branchpoint 1.22 (colored) next main 1.23 (colored)

Sync with HEAD.

Revision 1.22.8.1 / (download) - annotate - [select for diffs], Sat Feb 7 02:32:37 2009 UTC (15 years ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b
Changes since 1.22: +7 -5 lines
Diff to previous 1.22 (colored) next main 1.23 (colored)

Pull up following revision(s) (requested by enami in ticket #422):
	sys/kern/subr_devsw.c: revision 1.25
- An errno is missed in rev. 1.11 while converting return statement to
  goto statement.
- A local variable still in use is intercepted in rev. 1.6.  Define and
  use variable of its own.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Feb 2 14:00:27 2009 UTC (15 years ago) by haad
Branch: MAIN
CVS Tags: yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base2, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base, jym-xensuspend
Changes since 1.25: +52 -2 lines
Diff to previous 1.25 (colored)

Add support for loading pseudo-device drivers. Try to autoload modules from
specs_open routine. If devsw_open fail, get driver name with devsw_getname
routine and autoload module.

For now only dm drivervcan be loaded, other pseudo drivers needs more work.

Ok by ad@.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Feb 2 11:19:29 2009 UTC (15 years ago) by enami
Branch: MAIN
Changes since 1.24: +7 -5 lines
Diff to previous 1.24 (colored)

- An errno is missed in rev. 1.11 while converting return statement to
  goto statement.
- A local variable still in use is intercepted in rev. 1.6.  Define and
  use variable of its own.

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jan 20 18:20:48 2009 UTC (15 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.23: +40 -32 lines
Diff to previous 1.23 (colored)

Change major()/minor() to return 32-bit types again, called
devmajor_t/devminor_t, as proposed on tech-kern.
This avoids 64-bit arithmetics and 64-bit printf formats in parts
of the kernel where it is not really useful, and helps clarity.

Revision 1.22.6.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:19:39 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.22: +33 -32 lines
Diff to previous 1.22 (colored)

Sync with HEAD.

Revision 1.15.6.9 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:19 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.8: +31 -30 lines
Diff to previous 1.15.6.8 (colored) to branchpoint 1.15 (colored) next main 1.16 (colored)

Sync with HEAD.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Dec 29 17:41:18 2008 UTC (15 years, 2 months ago) by pooka
Branch: MAIN
CVS Tags: mjf-devfs2-base
Changes since 1.22: +33 -32 lines
Diff to previous 1.22 (colored)

Rename specfs_lock as device_lock and move it from specfs to devsw.
Relaxes kernel dependency on vfs.

Revision 1.15.6.8 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:14 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.7: +1 -7 lines
Diff to previous 1.15.6.7 (colored) to branchpoint 1.15 (colored)

Sync with HEAD.

Revision 1.18.2.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:31:51 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.18: +36 -43 lines
Diff to previous 1.18 (colored) next main 1.19 (colored)

Sync w/ -current. 34 merge conflicts to follow.

Revision 1.17.2.3 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:03 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.17.2.2: +3 -9 lines
Diff to previous 1.17.2.2 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored)

sync with head.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Jun 8 12:23:18 2008 UTC (15 years, 8 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base4, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, netbsd-5-0-RC1, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base, ad-audiomp2
Branch point for: nick-hppapmap, netbsd-5
Changes since 1.21: +2 -3 lines
Diff to previous 1.21 (colored)

Correct previous.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jun 8 12:22:39 2008 UTC (15 years, 8 months ago) by ad
Branch: MAIN
Changes since 1.20: +3 -8 lines
Diff to previous 1.20 (colored)

cdev_tty: don't acquire kernel lock, as we may need to call this with
tty_lock already held (and it would reverse the usual lock order).

Revision 1.17.2.2 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:39 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.17.2.1: +35 -36 lines
Diff to previous 1.17.2.1 (colored) to branchpoint 1.17 (colored)

sync with head

Revision 1.15.6.7 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:10 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.6: +53 -55 lines
Diff to previous 1.15.6.6 (colored) to branchpoint 1.15 (colored)

Sync with HEAD.

Revision 1.20 / (download) - annotate - [select for diffs], Sat May 31 21:34:42 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Changes since 1.19: +33 -35 lines
Diff to previous 1.19 (colored)

Kill devsw_lock and just use specfs_lock. The two would need merging
in order to prevent unload of modules when a device that they provide
is still open.

Revision 1.19 / (download) - annotate - [select for diffs], Mon May 19 17:15:00 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: hpcarm-cleanup-nbase
Changes since 1.18: +4 -3 lines
Diff to previous 1.18 (colored)

Give devsw_detach() a dummy error return.

Revision 1.17.2.1 / (download) - annotate - [select for diffs], Sun May 18 12:35:09 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.17: +2 -9 lines
Diff to previous 1.17 (colored)

sync with head.

Revision 1.17.4.1 / (download) - annotate - [select for diffs], Fri May 16 02:25:26 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.17: +2 -9 lines
Diff to previous 1.17 (colored)

sync with head.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Apr 28 20:24:04 2008 UTC (15 years, 10 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base2, yamt-nfs-mp-base2
Branch point for: wrstuden-revivesa
Changes since 1.17: +2 -9 lines
Diff to previous 1.17 (colored)

Remove clause 3 and 4 from TNF licenses

Revision 1.15.6.6 / (download) - annotate - [select for diffs], Mon Apr 14 16:23:56 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.5: +86 -14 lines
Diff to previous 1.15.6.5 (colored) to branchpoint 1.15 (colored)

- remove comments that are no longer true
- add support to devfsd(8) and devfsctl(4) to handle wedges
- add cpuctl device registration
- extract the alloc part out of device_register_name() into a common function
  that can be used by the new device_register_sync(), which is used to
  synchronously create device files

Revision 1.17 / (download) - annotate - [select for diffs], Sun Apr 6 17:27:39 2008 UTC (15 years, 10 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, yamt-nfs-mp-base
Branch point for: yamt-pf42, yamt-nfs-mp
Changes since 1.16: +20 -16 lines
Diff to previous 1.16 (colored)

When accessing a block/char device, cache the D_MPSAFE flag on initial
access, in case the devsw record is modified.

Revision 1.15.6.5 / (download) - annotate - [select for diffs], Sun Apr 6 09:58:52 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.4: +4 -4 lines
Diff to previous 1.15.6.4 (colored) to branchpoint 1.15 (colored)

- after some discussion with agc@ i agreed it would be a good idea to move
  device_unregister_* to device_deregister_* to be more like the pmf(9)
  functions, especially since a lot of the time the function calls are next
  to each other.

- add device_register_name() support for dk(4).

Revision 1.15.6.4 / (download) - annotate - [select for diffs], Sat Apr 5 23:33:23 2008 UTC (15 years, 10 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.3: +20 -3 lines
Diff to previous 1.15.6.3 (colored) to branchpoint 1.15 (colored)

- add "file-system DEVFS" and "pseudo-device devfsctl" to conf/std seeing
  as these are always needed.

- convert many, many drivers over to the New Devfs World Order. For a
  list of device drivers yet to be converted see,
  http://www.netbsd.org/~mjf/devfs-todo.html.

- add a new device_unregister_all(device_t) function to remove all device
  names associated with a device_t, which saves us having to construct
  device names when the driver is detached.

- add a DEV_AUDIO type for devices.

Revision 1.15.6.3 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:03 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.2: +49 -2 lines
Diff to previous 1.15.6.2 (colored) to branchpoint 1.15 (colored)

Sync with HEAD.

Revision 1.15.6.2 / (download) - annotate - [select for diffs], Thu Apr 3 11:37:26 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15.6.1: +4 -4 lines
Diff to previous 1.15.6.1 (colored) to branchpoint 1.15 (colored)

- Make distrib/sets and sys/fs/devfs catch up with dctl rename to devfsctl.

- The visibility of a node is now properly determined in devfs.

- device_lookup_info() has grown an argument to distinguish whether we're
  looking for a character or block device, since it's possible for the same
  dev_t value to be used for a character device and a different block device.

Revision 1.7.16.6 / (download) - annotate - [select for diffs], Mon Mar 24 09:39:02 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.7.16.5: +49 -2 lines
Diff to previous 1.7.16.5 (colored) to branchpoint 1.7 (colored) next main 1.8 (colored)

sync with head.

Revision 1.11.8.4 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:00 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.11.8.3: +3 -2 lines
Diff to previous 1.11.8.3 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

sync with HEAD

Revision 1.16 / (download) - annotate - [select for diffs], Fri Mar 21 19:32:07 2008 UTC (15 years, 11 months ago) by plunky
Branch: MAIN
CVS Tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, ad-socklock-base1
Changes since 1.15: +49 -2 lines
Diff to previous 1.15 (colored)

add devsw_name2chr() function to look up character devices

Revision 1.15.6.1 / (download) - annotate - [select for diffs], Thu Mar 20 12:11:07 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.15: +123 -2 lines
Diff to previous 1.15 (colored)

- Introduce new API for allowing device drivers to register/unregister
  names for device nodes along with a corresponding dev_t.

- Make device drivers that technically never get attached and need device
  nodes (mem, zero, null) provide an initialisation function, which gets
  an entry in a table of init functions that devsw_init() calls when the
  device switch tables are initialised.

- Since we're moving to a new way of notifying devfsd(8) of new devices,
  we no longer need to link together struct devices.

Revision 1.7.16.5 / (download) - annotate - [select for diffs], Wed Feb 27 08:36:56 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.7.16.4: +3 -2 lines
Diff to previous 1.7.16.4 (colored) to branchpoint 1.7 (colored)

sync with head.

Revision 1.12.4.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:06:47 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.12.4.2: +3 -2 lines
Diff to previous 1.12.4.2 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

Sync with HEAD.

Revision 1.15 / (download) - annotate - [select for diffs], Wed Feb 13 18:43:16 2008 UTC (16 years ago) by matt
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base
Branch point for: mjf-devfs2
Changes since 1.14: +3 -2 lines
Diff to previous 1.14 (colored)

#include <sys/cpu.h> for curlwp

Revision 1.11.8.3 / (download) - annotate - [select for diffs], Wed Jan 9 01:56:15 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.11.8.2: +8 -8 lines
Diff to previous 1.11.8.2 (colored) to branchpoint 1.11 (colored)

sync with HEAD

Revision 1.12.4.2 / (download) - annotate - [select for diffs], Sat Dec 8 18:20:36 2007 UTC (16 years, 2 months ago) by mjf
Branch: mjf-devfs
Changes since 1.12.4.1: +8 -8 lines
Diff to previous 1.12.4.1 (colored) to branchpoint 1.12 (colored)

Sync with HEAD.

Revision 1.7.16.4 / (download) - annotate - [select for diffs], Fri Dec 7 17:33:04 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.7.16.3: +8 -8 lines
Diff to previous 1.7.16.3 (colored) to branchpoint 1.7 (colored)

sync with head

Revision 1.11.6.3 / (download) - annotate - [select for diffs], Wed Nov 21 21:56:02 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.11.6.2: +8 -8 lines
Diff to previous 1.11.6.2 (colored) to branchpoint 1.11 (colored) next main 1.12 (colored)

Sync with HEAD.

Revision 1.12.2.2 / (download) - annotate - [select for diffs], Wed Nov 21 21:19:46 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.12.2.1: +6 -6 lines
Diff to previous 1.12.2.1 (colored) to branchpoint 1.12 (colored) next main 1.13 (colored)

Sync with HEAD

Revision 1.14 / (download) - annotate - [select for diffs], Tue Nov 20 14:47:14 2007 UTC (16 years, 3 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, yamt-kmem-base, yamt-kmem, vmlocking2-base3, vmlocking2-base2, vmlocking2-base1, vmlocking2, vmlocking-nbase, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, matt-armv6-base, jmcneill-pm-base, cube-autoconf-base, cube-autoconf, bouyer-xeni386-nbase, bouyer-xeni386-merge1, bouyer-xeni386-base, bouyer-xeni386, bouyer-xenamd64-base2, bouyer-xenamd64-base
Changes since 1.13: +8 -8 lines
Diff to previous 1.13 (colored)

Don't pass devname to {b,c}devsw_attach(), it's not used.

Revision 1.12.4.1 / (download) - annotate - [select for diffs], Mon Nov 19 00:48:49 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Sync with HEAD.

Revision 1.7.16.3 / (download) - annotate - [select for diffs], Thu Nov 15 11:44:48 2007 UTC (16 years, 3 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.7.16.2: +3 -3 lines
Diff to previous 1.7.16.2 (colored) to branchpoint 1.7 (colored)

sync with head.

Revision 1.12.2.1 / (download) - annotate - [select for diffs], Tue Nov 13 16:02:17 2007 UTC (16 years, 3 months ago) by bouyer
Branch: bouyer-xenamd64
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Sync with HEAD

Revision 1.11.6.2 / (download) - annotate - [select for diffs], Sun Nov 11 16:48:07 2007 UTC (16 years, 3 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.11.6.1: +3 -3 lines
Diff to previous 1.11.6.1 (colored) to branchpoint 1.11 (colored)

Sync with HEAD.

Revision 1.11.8.2 / (download) - annotate - [select for diffs], Thu Nov 8 11:00:04 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.11.8.1: +3 -3 lines
Diff to previous 1.11.8.1 (colored) to branchpoint 1.11 (colored)

sync with -HEAD

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 7 00:23:22 2007 UTC (16 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.12: +3 -3 lines
Diff to previous 1.12 (colored)

Merge from vmlocking:

- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.

Revision 1.11.8.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:32:13 2007 UTC (16 years, 3 months ago) by matt
Branch: matt-armv6
Changes since 1.11: +6 -2 lines
Diff to previous 1.11 (colored)

sync with HEAD

Revision 1.7.16.2 / (download) - annotate - [select for diffs], Sat Oct 27 11:35:32 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.7.16.1: +6 -2 lines
Diff to previous 1.7.16.1 (colored) to branchpoint 1.7 (colored)

sync with head.

Revision 1.11.6.1 / (download) - annotate - [select for diffs], Fri Oct 26 15:48:39 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.11: +6 -2 lines
Diff to previous 1.11 (colored)

Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.10.8.6 / (download) - annotate - [select for diffs], Thu Oct 25 14:47:13 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.10.8.5: +3 -3 lines
Diff to previous 1.10.8.5 (colored) to branchpoint 1.10 (colored) next main 1.11 (colored)

Export devsw_lock.

Revision 1.11.10.1 / (download) - annotate - [select for diffs], Sun Oct 14 11:48:45 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.11: +6 -2 lines
Diff to previous 1.11 (colored) next main 1.12 (colored)

sync with head.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Oct 8 16:54:09 2007 UTC (16 years, 4 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base
Branch point for: mjf-devfs, bouyer-xenamd64
Changes since 1.11: +6 -2 lines
Diff to previous 1.11 (colored)

Merge from vmlocking: in cdev_tty() check d_tty != NULL.

Revision 1.7.16.1 / (download) - annotate - [select for diffs], Mon Sep 3 14:41:01 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.7: +497 -100 lines
Diff to previous 1.7 (colored)

sync with head.

Revision 1.10.8.5 / (download) - annotate - [select for diffs], Tue Aug 28 13:22:30 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.10.8.4: +6 -2 lines
Diff to previous 1.10.8.4 (colored) to branchpoint 1.10 (colored)

cdev_tty: check d_tty != NULL before calling it.

Revision 1.10.8.4 / (download) - annotate - [select for diffs], Fri Aug 24 23:28:40 2007 UTC (16 years, 6 months ago) by ad
Branch: vmlocking
Changes since 1.10.8.3: +4 -2 lines
Diff to previous 1.10.8.3 (colored) to branchpoint 1.10 (colored)

Sync with buffer cache locking changes. See buf.h/vfs_bio.c for details.
Some minor portions are incomplete and needs to be verified as a whole.

Revision 1.10.8.3 / (download) - annotate - [select for diffs], Sun Jul 15 15:52:55 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.10.8.2: +15 -12 lines
Diff to previous 1.10.8.2 (colored) to branchpoint 1.10 (colored)

Sync with head.

Revision 1.10.10.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:10:03 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.10: +497 -100 lines
Diff to previous 1.10 (colored) next main 1.11 (colored)

Sync with head.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Jul 9 21:10:55 2007 UTC (16 years, 7 months ago) by ad
Branch: MAIN
CVS Tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5, nick-csl-alignment-base, nick-csl-alignment, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: yamt-x86pmap, matt-armv6, jmcneill-pm
Changes since 1.10: +497 -100 lines
Diff to previous 1.10 (colored)

Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements

Revision 1.10.8.2 / (download) - annotate - [select for diffs], Sat Apr 14 11:40:21 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.10.8.1: +8 -8 lines
Diff to previous 1.10.8.1 (colored) to branchpoint 1.10 (colored)

Fix a comment.

Revision 1.10.8.1 / (download) - annotate - [select for diffs], Fri Apr 13 20:56:18 2007 UTC (16 years, 10 months ago) by ad
Branch: vmlocking
Changes since 1.10: +499 -105 lines
Diff to previous 1.10 (colored)

- Make the devsw interface MP safe, and add some comments.
- Allow individual block/character drivers to be marked MP safe.
- Provide wrappers around the device methods that look up the
  device, returning ENXIO if it's not found, and acquire the
  kernel lock if needed.

Revision 1.8.22.2 / (download) - annotate - [select for diffs], Sun Dec 10 07:18:45 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.8.22.1: +4 -6 lines
Diff to previous 1.8.22.1 (colored) to branchpoint 1.8 (colored) next main 1.9 (colored)

sync with head.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Nov 1 10:17:58 2006 UTC (17 years, 4 months ago) by yamt
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-idlelwp-base8, yamt-idlelwp, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup, post-newlock2-merge, newlock2-nbase, newlock2-base, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-nb4-arm-base, matt-nb4-arm, ad-audiomp-base, ad-audiomp
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.9: +4 -6 lines
Diff to previous 1.9 (colored)

remove some __unused from function parameters.

Revision 1.8.22.1 / (download) - annotate - [select for diffs], Sun Oct 22 06:07:11 2006 UTC (17 years, 4 months ago) by yamt
Branch: yamt-splraiseipl
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored)

sync with head

Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 12 01:32:18 2006 UTC (17 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base2
Changes since 1.8: +6 -4 lines
Diff to previous 1.8 (colored)

- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.8 / (download) - annotate - [select for diffs], Sun Dec 11 12:24:30 2005 UTC (18 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-uio_vmspace, yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, yamt-pdpolicy-base4, yamt-pdpolicy-base3, yamt-pdpolicy-base2, yamt-pdpolicy-base, yamt-pdpolicy, simonb-timecounters-base, simonb-timecounters, simonb-timcounters-final, rpaulo-netinet-merge-pcb-base, rpaulo-netinet-merge-pcb, peter-altq-base, peter-altq, newlock2, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, elad-kernelauth, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Branch point for: yamt-splraiseipl
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

merge ktrace-lwp.

Revision 1.6.2.3 / (download) - annotate - [select for diffs], Tue Sep 21 13:35:11 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.6.2.2: +2 -2 lines
Diff to previous 1.6.2.2 (colored) next main 1.7 (colored)

Fix the sync with head I botched.

Revision 1.6.2.2 / (download) - annotate - [select for diffs], Sat Sep 18 14:53:03 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.6.2.1: +0 -0 lines
Diff to previous 1.6.2.1 (colored)

Sync with HEAD.

Revision 1.6.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:52:54 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.6: +4 -1 lines
Diff to previous 1.6 (colored)

Sync with HEAD

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jul 14 14:59:02 2003 UTC (20 years, 7 months ago) by lukem
Branch: MAIN
CVS Tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, yamt-km-base4, yamt-km-base3, yamt-km-base2, yamt-km-base, yamt-km, thorpej-vnode-attr-base, thorpej-vnode-attr, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, ktrace-lwp-base, kent-audio2-base, kent-audio2, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-lazymbuf
Changes since 1.6: +4 -1 lines
Diff to previous 1.6 (colored)

add missing __KERNEL_RCSID()

Revision 1.6 / (download) - annotate - [select for diffs], Fri May 16 14:25:03 2003 UTC (20 years, 9 months ago) by itojun
Branch: MAIN
Branch point for: ktrace-lwp
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored)

use strlcpy.  [fixed off-by-one in subr_prop.c]

Revision 1.5 / (download) - annotate - [select for diffs], Sat Feb 1 11:12:35 2003 UTC (21 years, 1 month ago) by mrg
Branch: MAIN
Changes since 1.4: +8 -3 lines
Diff to previous 1.4 (colored)

in devsw_name2blk(), as we use strncmp(), make sure the next character
in the device is either nul or a digit.  this avoids "raid0" being
matched as the "ra" device (and thus failing to find anything at all
causing my raid0 root to fail) on my vax.

Revision 1.4.4.2 / (download) - annotate - [select for diffs], Thu Oct 10 18:43:13 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.4.4.1: +455 -0 lines
Diff to previous 1.4.4.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.4.2.2 / (download) - annotate - [select for diffs], Tue Sep 17 21:22:16 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.4.2.1: +455 -0 lines
Diff to previous 1.4.2.1 (colored) to branchpoint 1.4 (colored) next main 1.5 (colored)

Catch up to -current.

Revision 1.4.4.1, Sun Sep 15 14:29:01 2002 UTC (21 years, 5 months ago) by jdolecek
Branch: kqueue
Changes since 1.4: +0 -455 lines
FILE REMOVED

file subr_devsw.c was added on branch kqueue on 2002-10-10 18:43:13 +0000

Revision 1.4.2.1, Sun Sep 15 14:29:01 2002 UTC (21 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.4: +0 -455 lines
FILE REMOVED

file subr_devsw.c was added on branch nathanw_sa on 2002-09-17 21:22:16 +0000

Revision 1.4 / (download) - annotate - [select for diffs], Sun Sep 15 14:29:01 2002 UTC (21 years, 5 months ago) by tsutsui
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, kqueue-beforemerge, kqueue-base, kqueue-aftermerge, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: nathanw_sa, kqueue
Changes since 1.3: +2 -2 lines
Diff to previous 1.3 (colored)

Fix devsw_name2blk() to return the correct device name for devname arg.
Ok'ed by gehenna.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Sep 11 16:33:03 2002 UTC (21 years, 5 months ago) by gehenna
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

fix that no major numbers is assigned dynamically if the
not-listed-in-majors device switch is loaded.

Revision 1.2 / (download) - annotate - [select for diffs], Fri Sep 6 13:18:43 2002 UTC (21 years, 5 months ago) by gehenna
Branch: MAIN
Changes since 1.1: +455 -0 lines
Diff to previous 1.1 (colored)

Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Thu Jun 6 02:46:11 2002 UTC (21 years, 8 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.1.2.6: +4 -4 lines
Diff to previous 1.1.2.6 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored)

fix typo.
pointed out by YAMAMOTO Takashi.

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Wed Jun 5 14:22:14 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.1.2.5: +185 -115 lines
Diff to previous 1.1.2.5 (colored) to branchpoint 1.1 (colored)

If majors are not specified, use majors listed up in majors.<arch>.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Wed May 22 10:57:12 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.1.2.4: +11 -2 lines
Diff to previous 1.1.2.4 (colored) to branchpoint 1.1 (colored)

Fix to recycle block/character majors.
Pointed out by yamt in local Japanese ML.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Sun May 19 14:36:40 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.1.2.3: +11 -7 lines
Diff to previous 1.1.2.3 (colored) to branchpoint 1.1 (colored)

Fix the rule to assign the majors dynamically, if not listed up in majors.<arch>.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Sun May 19 14:07:16 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.1.2.2: +120 -117 lines
Diff to previous 1.1.2.2 (colored) to branchpoint 1.1 (colored)

If the device switch is known (i.e. listed up majors.<arch>) or it has
been attached in the past, assign known block/character major.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Sun May 19 08:49:33 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.1.2.1: +2 -2 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored)

fix typo

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Thu May 16 03:39:13 2002 UTC (21 years, 9 months ago) by gehenna
Branch: gehenna-devsw
Changes since 1.1: +369 -0 lines
Diff to previous 1.1 (colored)

Add devsw APIs:

int devsw_attach(const char *devname, const struct bdevsw *bdev, int *bmajor,
		 const struct cdevsw *cdev, int *cmajor);
void devsw_detach(const struct bdevsw *bdev, const struct cdevsw *cdev);

const struct bdevsw *bdevsw_lookup(dev_t dev);
const struct cdevsw *cdevsw_lookup(dev_t dev);
int bdevsw_lookup_major(const struct bdevsw *bdev);
int cdevsw_lookup_major(const struct cdevsw *cdev);

const char *devsw_blk2name(int bmajor);
int devsw_name2blk(const char *name, char *devname, size_t devnamelen);
dev_t devsw_chr2blk(dev_t cdev);
dev_t devsw_blk2chr(dev_t bdev);

Revision 1.1, Thu May 16 03:39:13 2002 UTC (21 years, 9 months ago) by gehenna
Branch: MAIN
CVS Tags: gehenna-devsw-base
Branch point for: gehenna-devsw
FILE REMOVED

file subr_devsw.c was initially added on branch gehenna-devsw.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>