The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.13 / (download) - annotate - [selected], Mon Mar 28 12:38:59 2022 UTC (2 years ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, bouyer-sunxi-drm-base, bouyer-sunxi-drm, HEAD
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

sys: Split struct device into a private device_impl.h.

Include this only inside autoconf itself, and a few files that abuse
autoconf in ways I can't confidently make easy fixes for.

XXX kernel ABI change requires bump -- no more use of struct device
internals allowed, previously done by some drivers

Revision 1.12 / (download) - annotate - [select for diffs], Thu Mar 3 06:25:46 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.11: +13 -2 lines
Diff to previous 1.11 (colored) to selected 1.13 (colored)

driver(9): New device_set_private.

Used to initialize a device_t's private pointer at most once.  Only
for drivers with zero cfattach size so autoconf doesn't preallocate;
KASSERT checks for this mistake.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jan 22 11:58:15 2022 UTC (2 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.10: +45 -2 lines
Diff to previous 1.10 (colored) to selected 1.13 (colored)

Add a function to compare 2 devhandles.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jan 21 15:55:36 2022 UTC (2 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.9: +9 -6 lines
Diff to previous 1.9 (colored) to selected 1.13 (colored)

Replace devhandle_invalidate(), which invalidates a devhandle, with
devhandle_invalid(), which returns an invalid devhandle.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Sep 15 17:33:08 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.8: +8 -6 lines
Diff to previous 1.8 (colored) to selected 1.13 (colored)

Adjust the device_call() calling convention so as to provide type checking
of the arguments passed to the call, using auto-generated argument
structures and binding macros.

Revision 1.8.2.1 / (download) - annotate - [select for diffs], Sat Sep 11 17:22:36 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-i2c-spi-conf2
Changes since 1.8: +18 -2 lines
Diff to previous 1.8 (colored) next main 1.9 (colored) to selected 1.13 (colored)

Add a devhandle_subclass() helper function to simplify the common case
and use it.  Improve some comments.

Revision 1.8 / (download) - annotate - [select for diffs], Sat Aug 7 18:16:42 2021 UTC (2 years, 7 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf2-base
Branch point for: thorpej-i2c-spi-conf2
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored) to selected 1.13 (colored)

Export devhandle_lookup_device_call().

Revision 1.7.4.1 / (download) - annotate - [select for diffs], Sat May 15 00:32:40 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored) next main 1.8 (colored) to selected 1.13 (colored)

Expose devhandle_lookup_device_call(), which can be useful when
"sub-classing" a devhandle implementation.

Revision 1.3.30.1 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:00 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.3: +134 -3 lines
Diff to previous 1.3 (colored) next main 1.4 (colored) to selected 1.13 (colored)

Sync with HEAD.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 6 05:33:20 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-futex-base, thorpej-cfargs2-base, thorpej-cfargs2, thorpej-cfargs-base, thorpej-cfargs, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Branch point for: thorpej-i2c-spi-conf
Changes since 1.6: +3 -3 lines
Diff to previous 1.6 (colored) to selected 1.13 (colored)

Fix a comment.  Thanks rillig@ for pointing it out!

Revision 1.6 / (download) - annotate - [select for diffs], Fri Feb 5 17:03:35 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.5: +110 -2 lines
Diff to previous 1.5 (colored) to selected 1.13 (colored)

Introduce a generalized "device handle", designed to abstract the handles
used by platform description mechanisms like OpenFirmware, Device Tree,
and ACPI.  In addition to encapsulating the handle's opaque value, the
handle also contains a pointer to an "implementation", which can be used
to invoke methods on a device / device handle.

Device handles are designed to be passed around by-value.  It is expected
that any other memory objects they refer to will be durable.  They are an
aggregate type that consumes 2 pointers worth of storage space.

When device_t's are created, they initially have an invalid device handle.
It is currently the responsibility of platform-specific code to assign
device handles to device_t's.

When necessary, platform-specific code can override a handle's implementation
in a way that resembles sub-classing, such that specific methods can by
intercepted, but others simply passed through.  This also allows platforms
that do not otherwise have a platform description mechanism to provide
handle implementations in specific circumstances to describe the hardware
to platform-independent code.

A general device method calling infrastructure is provided.  Method names
that begin with "device-" are reserved for / defined by the autoconfiguration
subsystem.  Define the "device-enumerate-children" method.  Other subsystems
are free to define their own device method calls and bindings.

Welcome to NetBSD 9.99.80.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Feb 4 23:29:16 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.4: +23 -3 lines
Diff to previous 1.4 (colored) to selected 1.13 (colored)

Add device_attached_to_iattr(), which return true if the device
attached to the specified interface attribute.

Revision 1.4 / (download) - annotate - [select for diffs], Thu Jan 28 15:53:46 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.3: +5 -2 lines
Diff to previous 1.3 (colored) to selected 1.13 (colored)

In device_is_a(), handle dev or dev->dv_cfdriver being NULL.  This
makes the calling pattern:

	device_is_a(device_parent(dev), "whatever")

safe.

Revision 1.2.22.1 / (download) - annotate - [select for diffs], Sun Dec 3 11:38:45 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.2: +4 -1 lines
Diff to previous 1.2 (colored) next main 1.3 (colored) to selected 1.13 (colored)

update from HEAD

Revision 1.2.40.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:20 2015 UTC (8 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.2: +5 -2 lines
Diff to previous 1.2 (colored) next main 1.3 (colored) to selected 1.13 (colored)

Sync with HEAD

Revision 1.3 / (download) - annotate - [select for diffs], Mon Mar 9 15:35:11 2015 UTC (9 years ago) by pooka
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, phil-wifi, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, 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, perseant-stdc-iso10646-base, perseant-stdc-iso10646, nick-nhusb-base-20170825, nick-nhusb-base-20170204, nick-nhusb-base-20161204, nick-nhusb-base-20161004, nick-nhusb-base-20160907, nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, 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, netbsd-9, 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, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache
Branch point for: thorpej-futex
Changes since 1.2: +5 -2 lines
Diff to previous 1.2 (colored) to selected 1.13 (colored)

The use of root_device is not limited to vfs, so don't supply it in
vfs_mount.c, use subr_device.c instead.

Fixes rump kernels built with DEBUG by again not making the base depend
on the vfs faction, as reported by Patrick Welche.

Revision 1.1.12.1 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:18 2010 UTC (14 years ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.1: +178 -0 lines
Diff to previous 1.1 (colored) next main 1.2 (colored) to selected 1.13 (colored)

sync with head

Revision 1.2 / (download) - annotate - [select for diffs], Sun Jan 31 15:10:12 2010 UTC (14 years, 1 month ago) by pooka
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, yamt-nfs-mp-base9, 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, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-uvmplock-nbase, rmind-uvmplock-base, rmind-uvmplock, 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, nick-nhusb-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, 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, matt-mips64-premerge-20101231, khorben-n900, jruoho-x86intr-base, jruoho-x86intr, jmcneill-usbmp-pre-base2, 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, jmcneill-usbmp-base, jmcneill-usbmp, jmcneill-audiomp3-base, jmcneill-audiomp3, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver
Branch point for: tls-maxphys, nick-nhusb
Changes since 1.1: +178 -0 lines
Diff to previous 1.1 (colored) to selected 1.13 (colored)

Device accessors are only marginally related to autoconf, so put them
into subr_device.c instead of having them in subr_autoconf.c.

Since none of the copyrights in subr_autoconf.c really match the
history of device accessors, I took the liberty of slapping (c)
2006 TNF onto subr_device.c.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Wed Jan 30 22:08:51 2008 UTC (16 years, 2 months ago) by cube
Branch: cube-autoconf
Changes since 1.1.2.1: +10 -3 lines
Diff to previous 1.1.2.1 (colored) to branchpoint 1.1 (colored) next main 1.2 (colored) to selected 1.13 (colored)

Allow device_private(NULL), returning NULL.  It makes a lot of stuff
simpler, and in the situations where device_private was expected to crash,
it will soon enough anyway.

Revision 1.1.4.2, Sun Dec 16 18:54:07 2007 UTC (16 years, 3 months ago) by cube
Branch: mjf-devfs
Changes since 1.1.4.1: +0 -0 lines
FILE REMOVED

file subr_device.c was initially added on branch cube-autoconf.

Revision 1.1.4.1, Sun Dec 16 18:54:06 2007 UTC (16 years, 3 months ago) by cube
Branch: mjf-devfs
Changes since 1.1: +0 -0 lines
FILE REMOVED

file subr_device.c was added on branch mjf-devfs on 2007-12-16 18:54:07 +0000

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sun Dec 16 18:54:06 2007 UTC (16 years, 3 months ago) by cube
Branch: cube-autoconf
Changes since 1.1: +493 -0 lines
Diff to previous 1.1 (colored) to selected 1.13 (colored)

Split off device-specific stuff out of subr_autconf.c, and split off
autoconf-specific stuff out of device.h.

The only functional change is the removal of the unused evcnt.h include in
device.h which (*sigh*) has side-effects in x86's intr.h, and probably some
other in the rest of the tree but I'm only compiling i386's QEMU for the
time being.

Revision 1.1, Sun Dec 16 18:54:06 2007 UTC (16 years, 3 months ago) by cube
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, vmlocking2-base3, simonb-wapbl-nbase, simonb-wapbl-base, simonb-wapbl, netbsd-5-base, 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-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, mjf-devfs2-base, mjf-devfs2, mjf-devfs-base, matt-nb5-pq3-base, matt-nb5-pq3, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, jymxensuspend-base, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, bouyer-xeni386-nbase, bouyer-xeni386-base, ad-socklock-base1, ad-audiomp2-base, ad-audiomp2
Branch point for: yamt-nfs-mp, mjf-devfs, cube-autoconf
FILE REMOVED

file subr_device.c was initially added on branch cube-autoconf.

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>