The NetBSD Project

CVS log for src/sys/sys/device.h

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.188 / (download) - annotate - [select for diffs], Mon Jan 15 18:15:37 2024 UTC (7 weeks ago) by thorpej
Branch: MAIN
CVS Tags: triaxx-drm, HEAD
Changes since 1.187: +4 -12 lines
Diff to previous 1.187 (colored)

Revert unintended commit (didn't hit CTRL-C fast enough I guess).

Revision 1.187 / (download) - annotate - [select for diffs], Mon Jan 15 18:14:23 2024 UTC (7 weeks ago) by thorpej
Branch: MAIN
Changes since 1.186: +13 -5 lines
Diff to previous 1.186 (colored)

Provide an ev_count32 field for situations where a 32-bit counter is
sufficient (and, notably, might be desirable to avoid 64-bit math on
an older 32-bit platform).  This is overlaid on the 64-bit counter
field, and simply references the correct half based on byte order.

Revision 1.186 / (download) - annotate - [select for diffs], Mon May 22 14:58:22 2023 UTC (9 months, 2 weeks ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-ifq-base, thorpej-ifq, thorpej-altq-separation-base, thorpej-altq-separation
Changes since 1.185: +8 -1 lines
Diff to previous 1.185 (colored)

autoconf(9): New functions for referenced attach/detach.

New functions:

- config_found_acquire(dev, aux, print, cfargs)
- config_attach_acquire(parent, cf, aux, print, cfargs)
- config_attach_pseudo_acquire(cf, aux)
- config_detach_release(dev, flags)
- device_acquire(dev)

The config_*_acquire functions are like the non-acquire versions, but
they return a referenced device_t, which is guaranteed to be safe to
use until released.  The device's detach function may run while it is
referenced, but the device_t will not be freed and the parent's
.ca_childdetached routine will not be called.

=> config_attach_pseudo_acquire additionally lets you pass an aux
   argument to the device's .ca_attach routine, unlike
   config_attach_pseudo which always passes NULL.

=> Eventually, config_found, config_attach, and config_attach_pseudo
   should be made to return void, because use of the device_t they
   return is unsafe without the kernel lock and difficult to use
   safely even with the kernel lock or in a UP system.  For now,
   they require the caller to hold the kernel lock, while
   config_*_acquire do not.

config_detach_release is like device_release and then config_detach,
but avoids the race inherent with that sequence.

=> Eventually, config_detach should be eliminated, because getting at
   the device_t it needs is unsafe without the kernel lock and
   difficult to use safely even with the kernel lock or in a UP
   system.  For now, it requires the caller to hold the kernel lock,
   while config_detach_release does not.

device_acquire acquires a reference to a device.  It never fails and
can be used in thread context (but not interrupt context, hard or
soft).  Caller is responsible for ensuring that the device_t cannot
be freed; in other words, the device_t must be made unavailable to
any device_acquire callers before the .ca_detach function returns.
Typically device_acquire will be used in a read section (mutex,
rwlock, pserialize, &c.) in a data structure lookup, with
corresponding logic in the .ca_detach function to remove the device
from the data structure and wait for all read sections to complete.

Proposed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/05/10/msg028889.html

Revision 1.185 / (download) - annotate - [select for diffs], Wed Aug 24 11:19:25 2022 UTC (18 months, 1 week ago) by riastradh
Branch: MAIN
CVS Tags: netbsd-10-base, 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
Changes since 1.184: +3 -3 lines
Diff to previous 1.184 (colored)

pmf(9): *_child_register never fails.  Make it return void.

No kernel bump because this isn't documented or used in any modules,
only in dev/pci/pci.c and dev/cardbus/cardbus.c which are as far as I
know always statically linked into the kernel.

The next change, however, will require a revbump -- to make
pmf_device_register return void so we can prune vast swaths of dead
error branches.

Revision 1.184 / (download) - annotate - [select for diffs], Wed Aug 24 11:19:10 2022 UTC (18 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.183: +1 -43 lines
Diff to previous 1.183 (colored)

kern: Move various pmf declarations to device_impl.h.

These are used only inside subr_autoconf.c and subr_pmf.c.  Let's
stop having changes to these trigger rebuilds of all device drivers.

Revision 1.183 / (download) - annotate - [select for diffs], Wed Aug 24 11:18:56 2022 UTC (18 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.182: +2 -2 lines
Diff to previous 1.182 (colored)

kern: device_pmf_driver_register never fails, so make it return void.

No ABI bump despite change to device.h because this is used only
inside autoconf.

Revision 1.182 / (download) - annotate - [select for diffs], Mon Mar 28 12:38:59 2022 UTC (23 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.181: +6 -65 lines
Diff to previous 1.181 (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.181 / (download) - annotate - [select for diffs], Mon Mar 28 12:38:15 2022 UTC (23 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.180: +3 -1 lines
Diff to previous 1.180 (colored)

autoconf(9): New function config_detach_commit.

When a driver's .ca_detach function has committed to detaching -- it
definitely won't back out with EBUSY, for instance -- it can call
this to wake all pending calls to device_lookup_acquire and make them
fail immediately.

This is necessary to break a deadlock if the device_lookup_acquire
calls happen inside I/O operations which the driver's .ca_detach
function waits for the completion of -- without config_detach_commit,
I/O operations would be stuck in device_lookup_acquire waiting for
.ca_detach and .ca_detach would be stuck waiting for I/O operations
to return.

Most drivers won't need to call this: for autoconf drivers used the
traditional way by devsw for userland device nodes, the .ca_detach
routine uses vdevgone, and we will arrange to make vdevgone call
config_detach_commit automagically in such drivers anyway.

XXX kernel ABI change to struct device requires bump -- later change
will make struct device opaque to ABI, but we're not there yet

Revision 1.180 / (download) - annotate - [select for diffs], Mon Mar 28 12:33:41 2022 UTC (23 months, 1 week ago) by riastradh
Branch: MAIN
Changes since 1.179: +7 -1 lines
Diff to previous 1.179 (colored)

autoconf(9): New localcount-based device instance references.

device_lookup_acquire looks up an autoconf device instance, if found,
and acquires a reference the caller must release with device_release.
If attach or detach is still in progress, device_lookup_acquire waits
until it completes.  While references are held, the device's softc
will not be freed or reused until the last reference is released.

The reference is meant to be held while opening a device in the short
term, and then to be passed off to a longer-term reference that can
be broken explicitly by detach -- usually a device special vnode,
which is broken by vdevgone in the driver's *_detach function.

Sleeping while holding a reference is allowed, e.g. waiting to open a
tty.  A driver must arrange that its *_detach function will interrupt
any threads sleeping while holding references and cause them to back
out so that detach can complete promptly.

Subsequent changes to subr_devsw.c will make bdev_open and cdev_open
automatically take a reference to an autoconf instance for drivers
that opt into this, so there will be no logic changes needed in most
drivers other than to connect the autoconf cfdriver to the
bdevsw/cdevsw I/O operation tables.  The effect will be that *_detach
may run while d_open is in progress, but no new d_open can begin
until *_detach has backed out from or committed to detaching.

XXX kernel ABI change to struct device requires bump -- later change
will make struct device opaque to ABI, but we're not there yet

Revision 1.179 / (download) - annotate - [select for diffs], Thu Mar 3 06:25:46 2022 UTC (2 years ago) by riastradh
Branch: MAIN
Changes since 1.178: +2 -1 lines
Diff to previous 1.178 (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.178 / (download) - annotate - [select for diffs], Sat Jan 22 11:58:15 2022 UTC (2 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.177: +2 -1 lines
Diff to previous 1.177 (colored)

Add a function to compare 2 devhandles.

Revision 1.177 / (download) - annotate - [select for diffs], Sat Jan 22 11:16:00 2022 UTC (2 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.176: +2 -2 lines
Diff to previous 1.176 (colored)

Make the devhandle "integer" field an intptr_t to ensure that all
bits of the union are initialized when that field is used.

Revision 1.176 / (download) - annotate - [select for diffs], Fri Jan 21 15:55:36 2022 UTC (2 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.175: +2 -2 lines
Diff to previous 1.175 (colored)

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

Revision 1.175 / (download) - annotate - [select for diffs], Wed Sep 15 17:33:08 2021 UTC (2 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.174: +12 -13 lines
Diff to previous 1.174 (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.173.2.1 / (download) - annotate - [select for diffs], Sat Sep 11 17:22:36 2021 UTC (2 years, 5 months ago) by thorpej
Branch: thorpej-i2c-spi-conf2
Changes since 1.173: +4 -1 lines
Diff to previous 1.173 (colored) next main 1.174 (colored)

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

Revision 1.174 / (download) - annotate - [select for diffs], Sun Aug 15 22:08:01 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.173: +6 -2 lines
Diff to previous 1.173 (colored)

Define a constant for the size of device_t::dv_xname, rather than just
using 16.

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

Export devhandle_lookup_device_call().

Revision 1.172 / (download) - annotate - [select for diffs], Sat Aug 7 16:19:18 2021 UTC (2 years, 6 months ago) by thorpej
Branch: MAIN
Changes since 1.171: +40 -27 lines
Diff to previous 1.171 (colored)

Merge thorpej-cfargs2.

Revision 1.171.2.2 / (download) - annotate - [select for diffs], Sat Aug 7 14:21:28 2021 UTC (2 years, 6 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.171.2.1: +3 -1 lines
Diff to previous 1.171.2.1 (colored) to branchpoint 1.171 (colored) next main 1.172 (colored)

Hide "struct cfargs" from user space.

Revision 1.171.2.1 / (download) - annotate - [select for diffs], Tue Aug 3 15:00:15 2021 UTC (2 years, 7 months ago) by thorpej
Branch: thorpej-cfargs2
Changes since 1.171: +38 -27 lines
Diff to previous 1.171 (colored)

Address concerns about limited compile-time type checking with the
tag-value mechanism of specifying arguments to config_search(),
config_found(), and config_attach() by replacing the tag-value scheme
with a "struct cfargs", a pointer to which is passed to the aforementioned
functions instead.

The structure has a version field to allow for future ABI versioning
flexibility.  The external structure is canononicalized internally
before use.

To ease the initialization of this structure, use a variadic preprocessor
macro, CFARGS(), to construct an anonymous "struct cfargs" inline, the
address of which is passed to the target function.  A CFARGS_NONE macro
provides a symbolic stand-in for when the caller doesn't want to pass
arguments (currently expands to NULL and is handled during canonicalization).

Revision 1.168.2.3 / (download) - annotate - [select for diffs], Thu Jun 17 04:46:36 2021 UTC (2 years, 8 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.168.2.2: +3 -1 lines
Diff to previous 1.168.2.2 (colored) next main 1.169 (colored)

Sync w/ HEAD.

Revision 1.171 / (download) - annotate - [select for diffs], Sat Jun 12 12:13:51 2021 UTC (2 years, 8 months ago) by riastradh
Branch: MAIN
CVS Tags: thorpej-i2c-spi-conf-base, thorpej-futex2-base, thorpej-futex2, thorpej-cfargs2-base
Branch point for: thorpej-cfargs2
Changes since 1.170: +3 -1 lines
Diff to previous 1.170 (colored)

autoconf(9): Prevent concurrent attach/detach and detach/detach.

- Use config_pending_incr/decr around attach.  No need for separate
  flag indicating device is still attaching.  (dv_flags locking is also
  incoherent.)

- Any config_pending now blocks config_detach.

- New dv_detaching exclusive lock for config_detach.

Revision 1.169.2.1 / (download) - annotate - [select for diffs], Mon May 31 22:15:22 2021 UTC (2 years, 9 months ago) by cjep
Branch: cjep_staticlib_x
Changes since 1.169: +4 -1 lines
Diff to previous 1.169 (colored) next main 1.170 (colored)

sync with head

Revision 1.168.2.2 / (download) - annotate - [select for diffs], Sat May 15 00:32:41 2021 UTC (2 years, 9 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.168.2.1: +3 -1 lines
Diff to previous 1.168.2.1 (colored)

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

Revision 1.168.2.1 / (download) - annotate - [select for diffs], Thu May 13 00:47:33 2021 UTC (2 years, 9 months ago) by thorpej
Branch: thorpej-i2c-spi-conf
Changes since 1.168: +15 -1 lines
Diff to previous 1.168 (colored)

Sync with HEAD.

Revision 1.170 / (download) - annotate - [select for diffs], Mon May 10 13:59:30 2021 UTC (2 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1
Changes since 1.169: +4 -1 lines
Diff to previous 1.169 (colored)

sparc{,64} promlib -> devhandle_t glue

Revision 1.169 / (download) - annotate - [select for diffs], Tue Apr 27 14:48:28 2021 UTC (2 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: cjep_staticlib_x-base
Branch point for: cjep_staticlib_x
Changes since 1.168: +12 -1 lines
Diff to previous 1.168 (colored)

The Amiga and Atari ports abuse some autoconfiguration internals as part
of their early console bring-up, so we need to expose some of the new
internals to them and adapt the call sites.

Revision 1.168 / (download) - annotate - [select for diffs], Sat Apr 24 23:37:01 2021 UTC (2 years, 10 months ago) by thorpej
Branch: MAIN
Branch point for: thorpej-i2c-spi-conf
Changes since 1.167: +21 -12 lines
Diff to previous 1.167 (colored)

Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
  actually needed.
- Don't be explicit about what interface attribute is attaching if
  the device only has one.  (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
  situations, making is visibly easier to see when indirect config is
  in play, and allowing for future change in semantics.  (As of now,
  this is just a wrapper around config_match(), but that is an
  implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance.  This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).

Revision 1.167.2.10 / (download) - annotate - [select for diffs], Sat Apr 24 18:07:07 2021 UTC (2 years, 10 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.9: +3 -2 lines
Diff to previous 1.167.2.9 (colored) to branchpoint 1.167 (colored) next main 1.168 (colored)

Use a value for CFARG_EOL that is not likely to be encountered randomly in
nature.  Suggested by dholland.

Revision 1.167.2.9 / (download) - annotate - [select for diffs], Sun Apr 4 19:23:53 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.8: +2 -1 lines
Diff to previous 1.167.2.8 (colored) to branchpoint 1.167 (colored)

Add a config_probe() function.  This is currently a synonym for config_match(),
but exists so as to make a distinction between probing (as is done in indirect
configuration) and matching (which is done in direct configuration).

The intention is for direct config "submatch" routines to use config_match()
and for indirect config "search" routines to use config_probe().

Revision 1.167.2.8 / (download) - annotate - [select for diffs], Sun Apr 4 19:12:28 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.7: +6 -5 lines
Diff to previous 1.167.2.7 (colored) to branchpoint 1.167 (colored)

Add a CFARG_SEARCH tag, which specifies an indirect config search function
(which has the same signature as a direct config submatch function).  This
is a synonym for CFARG_SUBMATCH internally, but this is an implementation
detail; the two things should be distinct to callers, because submatch
and search functions have different behaviors.  Only one SEARCH or SUBMATCH
argument is allowed.

Also, change config_get_cfargs() to panic if an unknown tag is passed
(we don't know what kind of argument to consume after an unknown tag, so
this is fatal).

Revision 1.158.2.2 / (download) - annotate - [select for diffs], Sat Apr 3 22:29:03 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.158.2.1: +176 -6 lines
Diff to previous 1.158.2.1 (colored) next main 1.159 (colored)

Sync with HEAD.

Revision 1.167.2.7 / (download) - annotate - [select for diffs], Sat Apr 3 16:09:44 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.6: +2 -1 lines
Diff to previous 1.167.2.6 (colored) to branchpoint 1.167 (colored)

Add CFARG_DEVHANDLE, allowing direct configuration using e.g. ACPI or
OpenFirmware / FDT to associate the handle with the device_t.

Revision 1.167.2.6 / (download) - annotate - [select for diffs], Sat Apr 3 06:54:29 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.5: +1 -2 lines
Diff to previous 1.167.2.5 (colored) to branchpoint 1.167 (colored)

config_attach_loc() -> config_attach() with CFARG_LOCATORS argument.

Revision 1.167.2.5 / (download) - annotate - [select for diffs], Sat Apr 3 01:57:19 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.4: +2 -2 lines
Diff to previous 1.167.2.4 (colored) to branchpoint 1.167 (colored)

Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.

Revision 1.167.2.4 / (download) - annotate - [select for diffs], Fri Apr 2 22:17:46 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.3: +1 -2 lines
Diff to previous 1.167.2.3 (colored) to branchpoint 1.167 (colored)

config_found_ia() -> config_found() w/ CFARG_IATTR.

Revision 1.167.2.3 / (download) - annotate - [select for diffs], Mon Mar 22 17:21:09 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.2: +2 -1 lines
Diff to previous 1.167.2.2 (colored) to branchpoint 1.167 (colored)

Temporarily continue to provide config_found_ia().

Revision 1.167.2.2 / (download) - annotate - [select for diffs], Sun Mar 21 21:09:16 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167.2.1: +3 -6 lines
Diff to previous 1.167.2.1 (colored) to branchpoint 1.167 (colored)

Give config_found() the same variadic arguments treatment as
config_search().  This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls.  Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.

Revision 1.167.2.1 / (download) - annotate - [select for diffs], Sat Mar 20 19:33:42 2021 UTC (2 years, 11 months ago) by thorpej
Branch: thorpej-cfargs
Changes since 1.167: +14 -5 lines
Diff to previous 1.167 (colored)

The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
  tag-value variadic arguments that can be passed to the various
  config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
  for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
  variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
  Noticed several incorrect usages along the way, which will be
  audited in a future commit.

Revision 1.167 / (download) - annotate - [select for diffs], Sat Feb 6 21:08:51 2021 UTC (3 years ago) by christos
Branch: MAIN
CVS Tags: thorpej-futex-base, thorpej-cfargs-base
Branch point for: thorpej-cfargs
Changes since 1.166: +28 -25 lines
Diff to previous 1.166 (colored)

Expose devhandle_t to standalone programs (fixes sparc* build etc)

Revision 1.166 / (download) - annotate - [select for diffs], Fri Feb 5 17:03:35 2021 UTC (3 years ago) by thorpej
Branch: MAIN
Changes since 1.165: +134 -1 lines
Diff to previous 1.165 (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.165 / (download) - annotate - [select for diffs], Thu Feb 4 23:29:16 2021 UTC (3 years ago) by thorpej
Branch: MAIN
Changes since 1.164: +2 -1 lines
Diff to previous 1.164 (colored)

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

Revision 1.164 / (download) - annotate - [select for diffs], Wed Jan 27 04:54:08 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.163: +11 -2 lines
Diff to previous 1.163 (colored)

Add device_compatible_match_id() and device_compatible_lookup_id(), which
are like device_compatible_match() and device_compatible_lookup(), but
take a single scalar value as an ID.

Add a "uintptr_t id" field to device_compatible_entry, in an anonymous
union with the existing "const char *compat" field.

Revision 1.163 / (download) - annotate - [select for diffs], Wed Jan 27 01:00:05 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.162: +3 -1 lines
Diff to previous 1.162 (colored)

Define a macro to terminate the common usage of device_compatible_entry
arrays, in order to placate the angry hordes objecting to use of a GCC
extension.

Revision 1.162 / (download) - annotate - [select for diffs], Sun Jan 24 17:42:37 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.161: +18 -1 lines
Diff to previous 1.161 (colored)

Refactor and simplify device_compatible_match(), and also provide
device_compatible_p{match,lookup}() which treats the strings in the
driver compatible data as pmatch(9) patterns.

Add device_compatible_{,p}{match,lookup}_strlist(), which are the same, but
take an OpenFirmware-style string list rather than an array of strings
for the device data.

Revision 1.161 / (download) - annotate - [select for diffs], Mon Jan 18 15:28:21 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.160: +5 -3 lines
Diff to previous 1.160 (colored)

Change the device_compatible_match() function to only perform the match.
Introduce a device_compatible_lookup() function to return an entry based
on the same matching criteria (a'la of_search_compatible()).

Update iic_compatible_match() to reflect the above change, and introduce
iic_compatible_lookup().  This pattern is less awkward to use.

Revision 1.160 / (download) - annotate - [select for diffs], Sun Jan 17 21:56:20 2021 UTC (3 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.159: +5 -2 lines
Diff to previous 1.159 (colored)

Change the device_compatible_entry struct to have a union of
a scalar value (uintptr_t value) and a pointer value (const void *data),
rather than just "uintptr_t data".  This eliminates the need for drivers
to cast this value, and doesn't lose const'ness of pointers assigned
to the field.

Update all of the users of this field to use the correct set of
designated initialisers for each specific case.

Revision 1.158.2.1 / (download) - annotate - [select for diffs], Mon Dec 14 14:38:17 2020 UTC (3 years, 2 months ago) by thorpej
Branch: thorpej-futex
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored)

Sync w/ HEAD.

Revision 1.159 / (download) - annotate - [select for diffs], Tue Nov 24 16:17:04 2020 UTC (3 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored)

PR/55816: Martin Husemann: widen cfunit to 24 bits so that it fits the
largest minor number which is 20 bits. Welcome to 2x2x19.

Revision 1.158 / (download) - annotate - [select for diffs], Sat Oct 3 22:32:50 2020 UTC (3 years, 5 months ago) by riastradh
Branch: MAIN
Branch point for: thorpej-futex
Changes since 1.157: +4 -1 lines
Diff to previous 1.157 (colored)

autoconf: Blame devices holding up boot with config_pending.

Blame message requires `boot -x' (AB_DEBUG).

Fix ata so it doesn't mismatch config_pending_incr/decr devices.

Revision 1.155.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:09:57 2019 UTC (4 years, 8 months ago) by christos
Branch: phil-wifi
Changes since 1.155: +4 -1 lines
Diff to previous 1.155 (colored) next main 1.156 (colored)

Sync with HEAD

Revision 1.151.2.4 / (download) - annotate - [select for diffs], Wed Dec 26 14:02:07 2018 UTC (5 years, 2 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.151.2.3: +2 -1 lines
Diff to previous 1.151.2.3 (colored) to branchpoint 1.151 (colored) next main 1.152 (colored)

Sync with HEAD, resolve a few conflicts

Revision 1.157 / (download) - annotate - [select for diffs], Sat Dec 1 01:51:38 2018 UTC (5 years, 3 months ago) by msaitoh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, 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, isaki-audio2-base, isaki-audio2, is-mlppp-base, is-mlppp, 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
Changes since 1.156: +2 -1 lines
Diff to previous 1.156 (colored)

 Add new dv_flags value DVF_ATTACH_INPROGRESS. Currenty, this flags is used
only for checking the registration of pmf.

 This flag should be set when an attach function(ca_attach) doesn't complete
the whole attach work when the function returned. config_interrupts() set it.
It's also required for device drivers who do a part of the attach work in their
own kthread to set it.

Revision 1.151.2.3 / (download) - annotate - [select for diffs], Sun Sep 30 01:45:58 2018 UTC (5 years, 5 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.151.2.2: +3 -1 lines
Diff to previous 1.151.2.2 (colored) to branchpoint 1.151 (colored)

Ssync with HEAD

Revision 1.149.10.1 / (download) - annotate - [select for diffs], Sun Sep 23 17:33:15 2018 UTC (5 years, 5 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.149: +3 -1 lines
Diff to previous 1.149 (colored) next main 1.150 (colored)

Pull up following revision(s) (requested by mrg in ticket #1025):

	sys/kern/subr_autoconf.c: revision 1.263
	sys/kern/kern_drvctl.c: revision 1.44
	sys/sys/device.h: revision 1.156
	sys/sys/systm.h: revision 1.278

- move export for devmon_insert_vec into sys/device.h.
- export root_is_mounted for future USB RB_ASKNAME hack.
- make some things in subr_autoconf.c static
- move device_printf() prototype out from the middle of two sets of
  aprint_*() prototypes.

Revision 1.156 / (download) - annotate - [select for diffs], Tue Sep 18 01:25:09 2018 UTC (5 years, 5 months ago) by mrg
Branch: MAIN
CVS Tags: pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930
Changes since 1.155: +3 -1 lines
Diff to previous 1.155 (colored)

- move export for devmon_insert_vec into sys/device.h.
- export root_is_mounted for future USB RB_ASKNAME hack.
- make some things in subr_autoconf.c static
- move device_printf() prototype out from the middle of two sets of
  aprint_*() prototypes.

Revision 1.151.2.2 / (download) - annotate - [select for diffs], Sat Jul 28 04:38:12 2018 UTC (5 years, 7 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.151.2.1: +7 -26 lines
Diff to previous 1.151.2.1 (colored) to branchpoint 1.151 (colored)

Sync with HEAD

Revision 1.155 / (download) - annotate - [select for diffs], Tue Jun 26 06:03:57 2018 UTC (5 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-0906, pgoyette-compat-0728
Branch point for: phil-wifi
Changes since 1.154: +4 -22 lines
Diff to previous 1.154 (colored)

In my quest to make device_compatible_entry (and associated goo)
super-general, it turns out I also made it a little to cumbersome
to use (if my tired fingers are any indication).  So, this is a
course-correction -- one string per entry (like of_compat_data,
which it will soon replace), and remove the over-verbose macros.

Revision 1.154 / (download) - annotate - [select for diffs], Tue Jun 26 04:32:35 2018 UTC (5 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.153: +4 -5 lines
Diff to previous 1.153 (colored)

Change device_compatible_match() and iic_compatible_match() to return
the weighted match value and take an optional compatible-entry pointer,
rather than the other way around.

Revision 1.151.2.1 / (download) - annotate - [select for diffs], Mon Jun 25 07:26:07 2018 UTC (5 years, 8 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.151: +29 -1 lines
Diff to previous 1.151 (colored)

Sync with HEAD

Revision 1.153 / (download) - annotate - [select for diffs], Mon Jun 18 15:36:54 2018 UTC (5 years, 8 months ago) by thorpej
Branch: MAIN
CVS Tags: pgoyette-compat-0625
Changes since 1.152: +6 -1 lines
Diff to previous 1.152 (colored)

Add device_compatible_match(), a generalized routine for weighted
matching of device_compatible_entry data to a device's "compatible"
strings.

Revision 1.152 / (download) - annotate - [select for diffs], Sun Jun 17 15:06:27 2018 UTC (5 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.151: +24 -1 lines
Diff to previous 1.151 (colored)

Add slightly-more generalized version of the "of_compat_data" structure
called "device_compatible_entry".  It performs a similar function, but
instead of one "compatible" string per entry, it takes an array of
"comaptible" strings per entry.  Also included are macros for initializing
an array of these entries and accessing data embedded in them.

Revision 1.151 / (download) - annotate - [select for diffs], Sun Mar 4 07:13:11 2018 UTC (6 years ago) by mlelstv
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.150: +7 -3 lines
Diff to previous 1.150 (colored)

Expose device structures to _KMEMUSER

Revision 1.142.2.4 / (download) - annotate - [select for diffs], Sun Dec 3 11:39:20 2017 UTC (6 years, 3 months ago) by jdolecek
Branch: tls-maxphys
Changes since 1.142.2.3: +11 -4 lines
Diff to previous 1.142.2.3 (colored) next main 1.143 (colored)

update from HEAD

Revision 1.150 / (download) - annotate - [select for diffs], Thu Nov 9 01:02:55 2017 UTC (6 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base-20171202
Changes since 1.149: +2 -1 lines
Diff to previous 1.149 (colored)

add a "booted_method" string to aid in debugging double boot matches.

Revision 1.149.8.2 / (download) - annotate - [select for diffs], Fri Apr 28 06:00:33 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.149.8.1: +2 -1 lines
Diff to previous 1.149.8.1 (colored) to branchpoint 1.149 (colored) next main 1.150 (colored)

Introduce config_detach_release() which does all the work from the
former config_detach().  Now, config_detach() simply acquires a
reference to the device, which config_detach_release() can release!

This is needed because some drivers call config_detach() with a
reference, while other drivers have not been updated to use the
localcount reference mechanism.  So we provide a shim to make
everyone equal.

Revision 1.149.8.1 / (download) - annotate - [select for diffs], Thu Apr 27 05:36:38 2017 UTC (6 years, 10 months ago) by pgoyette
Branch: prg-localcount2
Changes since 1.149: +8 -1 lines
Diff to previous 1.149 (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.149.2.3 / (download) - annotate - [select for diffs], Sun Jul 24 05:39:28 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.149.2.2: +2 -1 lines
Diff to previous 1.149.2.2 (colored) to branchpoint 1.149 (colored) next main 1.150 (colored)

Add a device_acquire() for when we need to grab a reference and we
already have a pointer to the device.

Revision 1.149.2.2 / (download) - annotate - [select for diffs], Sat Jul 16 22:06:42 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.149.2.1: +3 -1 lines
Diff to previous 1.149.2.1 (colored) to branchpoint 1.149 (colored)

Add new xxx_acquire variants for device_lookup_private() and
device_find_by_driver_unit_acquire rather than blindly making the old
variants call localcount_acquire().

Also fix a couple of locking sequences.

Thanks to Taylor for the review!

Revision 1.149.2.1 / (download) - annotate - [select for diffs], Sat Jul 16 02:13:08 2016 UTC (7 years, 7 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.149: +4 -1 lines
Diff to previous 1.149 (colored)

Initial set of changes for subr_autoconf usage of localcount mechanism.

Nothing actually uses this yet - all callers of device_lookup() need
conversion to device_lookup_acquire()/device_release().  This also
means that callers of device_lookup_private() need to be modified to
call device_release() when finished accessing the softc.

XXX Perhaps device_lookup_private() should be removed, and all callers
XXX modified to use device_lookup_acquire()/.../device_release()?

Revision 1.146.2.3 / (download) - annotate - [select for diffs], Sat Jul 9 20:25:24 2016 UTC (7 years, 7 months ago) by skrll
Branch: nick-nhusb
Changes since 1.146.2.2: +2 -1 lines
Diff to previous 1.146.2.2 (colored) to branchpoint 1.146 (colored) next main 1.147 (colored)

Sync with HEAD

Revision 1.144.4.2 / (download) - annotate - [select for diffs], Tue Jul 5 19:09:17 2016 UTC (7 years, 8 months ago) by snj
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, 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
Changes since 1.144.4.1: +2 -1 lines
Diff to previous 1.144.4.1 (colored) to branchpoint 1.144 (colored) next main 1.145 (colored)

Pull up following revision(s) (requested by bouyer in ticket #1186):
	sys/dev/ata/wd.c: revision 1.421
	sys/kern/subr_autoconf.c: revision 1.242 via patch
	sys/sys/device.h: revision 1.149
Add a new config_detach() flag, DETACH_POWEROFF, which is set when
detaching devices at shutdown time with RB_POWERDOWN.
When detaching wd(4), put the drive in standby before detach
for DETACH_POWEROFF.
Fix PR kern/51252

Revision 1.149 / (download) - annotate - [select for diffs], Sun Jun 19 09:35:06 2016 UTC (7 years, 8 months ago) by bouyer
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, 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, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, jdolecek-ncq-base, jdolecek-ncq, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: prg-localcount2, pgoyette-localcount, netbsd-8
Changes since 1.148: +2 -1 lines
Diff to previous 1.148 (colored)

Add a new config_detach() flag, DETACH_POWEROFF, which is set when
detaching devices at shutdown time with RB_POWERDOWN.
When detaching wd(4), put the drive in standby before detach
for DETACH_POWEROFF.
Fix PR kern/51252

Revision 1.146.2.2 / (download) - annotate - [select for diffs], Sun Dec 27 12:10:18 2015 UTC (8 years, 2 months ago) by skrll
Branch: nick-nhusb
Changes since 1.146.2.1: +2 -1 lines
Diff to previous 1.146.2.1 (colored) to branchpoint 1.146 (colored)

Sync with HEAD (as of 26th Dec)

Revision 1.148 / (download) - annotate - [select for diffs], Mon Dec 7 11:38:46 2015 UTC (8 years, 2 months ago) by pgoyette
Branch: MAIN
CVS Tags: nick-nhusb-base-20160529, nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226
Changes since 1.147: +2 -1 lines
Diff to previous 1.147 (colored)

Modularize drvctl(4)

Revision 1.146.2.1 / (download) - annotate - [select for diffs], Mon Apr 6 15:18:32 2015 UTC (8 years, 11 months ago) by skrll
Branch: nick-nhusb
Changes since 1.146: +2 -1 lines
Diff to previous 1.146 (colored)

Sync with HEAD

Revision 1.144.4.1 / (download) - annotate - [select for diffs], Mon Mar 9 08:56:02 2015 UTC (8 years, 11 months ago) by snj
Branch: netbsd-7
CVS Tags: 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
Changes since 1.144: +2 -1 lines
Diff to previous 1.144 (colored)

Pull up following revision(s) (requested by mrg in ticket #576):
	sys/kern/init_main.c: revision 1.462
	sys/kern/subr_autoconf.c: revision 1.234
	sys/sys/device.h: revision 1.147
wait for config_mountroot threads to complete before we tell init it
can start up.  this solves the problem where a console device needs
mountroot to complete attaching, and must create wsdisplay0 before
init tries to open /dev/console.  fixes PR#49709.
XXX: pullup-7

Revision 1.147 / (download) - annotate - [select for diffs], Fri Mar 6 09:28:15 2015 UTC (9 years ago) by mrg
Branch: MAIN
CVS Tags: nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406
Changes since 1.146: +2 -1 lines
Diff to previous 1.146 (colored)

wait for config_mountroot threads to complete before we tell init it
can start up.  this solves the problem where a console device needs
mountroot to complete attaching, and must create wsdisplay0 before
init tries to open /dev/console.  fixes PR#49709.

XXX: pullup-7

Revision 1.146 / (download) - annotate - [select for diffs], Sat Nov 22 11:04:57 2014 UTC (9 years, 3 months ago) by mlelstv
Branch: MAIN
CVS Tags: nick-nhusb-base
Branch point for: nick-nhusb
Changes since 1.145: +2 -1 lines
Diff to previous 1.145 (colored)

Let MD code provide boot disk information as spec string that can be
parsed by MI code. The format is the same as provided by an embedded
'root on <rootspec>' string in the config file. An embedded string
(other than a wildcard) still takes precedence.

Revision 1.145 / (download) - annotate - [select for diffs], Fri Sep 5 05:47:40 2014 UTC (9 years, 6 months ago) by matt
Branch: MAIN
Changes since 1.144: +7 -5 lines
Diff to previous 1.144 (colored)

Don't nest structure definitions.

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

Rebase to HEAD as of a few days ago.

Revision 1.139.4.3 / (download) - annotate - [select for diffs], Thu May 22 11:41:18 2014 UTC (9 years, 9 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.139.4.2: +3 -3 lines
Diff to previous 1.139.4.2 (colored) to branchpoint 1.139 (colored) next main 1.140 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.143.2.1 / (download) - annotate - [select for diffs], Sun May 18 17:46:21 2014 UTC (9 years, 9 months ago) by rmind
Branch: rmind-smpnet
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored) next main 1.144 (colored)

sync with head

Revision 1.112.6.1.4.1 / (download) - annotate - [select for diffs], Thu Nov 14 17:34:02 2013 UTC (10 years, 3 months ago) by matt
Branch: matt-nb5-mips64
Changes since 1.112.6.1: +12 -6 lines
Diff to previous 1.112.6.1 (colored) next main 1.112.6.2 (colored)

more things for xhci

Revision 1.144 / (download) - annotate - [select for diffs], Sat Oct 12 16:49:01 2013 UTC (10 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.143: +3 -3 lines
Diff to previous 1.143 (colored)

Pass the device name in, so we can debug what deferred drivers did not work.

Revision 1.142.2.2 / (download) - annotate - [select for diffs], Tue Nov 20 03:02:51 2012 UTC (11 years, 3 months ago) by tls
Branch: tls-maxphys
Changes since 1.142.2.1: +2 -15 lines
Diff to previous 1.142.2.1 (colored)

Resync to 2012-11-19 00:00:00 UTC

Revision 1.139.4.2 / (download) - annotate - [select for diffs], Tue Oct 30 17:22:56 2012 UTC (11 years, 4 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.139.4.1: +6 -19 lines
Diff to previous 1.139.4.1 (colored) to branchpoint 1.139 (colored)

sync with head

Revision 1.143 / (download) - annotate - [select for diffs], Sat Oct 27 17:18:40 2012 UTC (11 years, 4 months ago) by chs
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, agc-symver-base, agc-symver
Branch point for: rmind-smpnet
Changes since 1.142: +2 -15 lines
Diff to previous 1.142 (colored)

split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.

Revision 1.142.2.1 / (download) - annotate - [select for diffs], Wed Sep 12 06:15:35 2012 UTC (11 years, 5 months ago) by tls
Branch: tls-maxphys
Changes since 1.142: +12 -1 lines
Diff to previous 1.142 (colored)

Initial snapshot of work to eliminate 64K MAXPHYS.  Basically works for
physio (I/O to raw devices); needs more doing to get it going with the
filesystems, but it shouldn't damage data.

All work's been done on amd64 so far.  Not hard to add support to other
ports.  If others want to pitch in, one very helpful thing would be to
sort out when and how IDE disks can do 128K or larger transfers, and
adjust the various PCI IDE (or at least ahcisata) drivers and wd.c
accordingly -- it would make testing much easier.  Another very helpful
thing would be to implement a smart minphys() for RAIDframe along the
lines detailed in the MAXPHYS-NOTES file.

Revision 1.142 / (download) - annotate - [select for diffs], Sat Jul 7 16:15:21 2012 UTC (11 years, 8 months ago) by tsutsui
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.141: +2 -2 lines
Diff to previous 1.141 (colored)

unsigned -> unsigned int

Revision 1.140.6.1 / (download) - annotate - [select for diffs], Thu Jul 5 18:12:48 2012 UTC (11 years, 8 months ago) by riz
Branch: netbsd-6
CVS Tags: 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, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.140: +4 -4 lines
Diff to previous 1.140 (colored) next main 1.141 (colored)

Pull up following revision(s) (requested by mlelstv in ticket #402):
	sys/dev/vnd.c: revision 1.221
	sys/kern/init_main.c: revision 1.443
	sys/kern/init_main.c: revision 1.444
	sys/dev/dkwedge/dk.c: revision 1.64
	sys/arch/x86/x86/x86_autoconf.c: revision 1.63
	sys/arch/sparc64/sparc64/autoconf.c: revision 1.187
	sys/sys/device.h: revision 1.141
	sys/dev/dkwedge/dkwedge_bsdlabel.c: revision 1.17
	sys/kern/kern_subr.c: revision 1.213
	sys/arch/zaurus/zaurus/autoconf.c: revision 1.11
	sys/arch/xen/x86/autoconf.c: revision 1.14
	sys/sys/disk.h: revision 1.57
Use the label's packname to create wedge names instead of the classic
device names. Fall back to classic device names when the label has an
empty name or the default name 'fictitious'.
autodiscover wedges
Make detection of root on wedges (dk(4)) machine independent. Remove
MD code for x86, xen, sparc64.
Make detection of root on wedges (dk(4)) machine independent. Remove
MD code for zaurus.
Do not try to find the wedge we booted from if opendisk(booted_device)
failed.

Revision 1.141 / (download) - annotate - [select for diffs], Sun Jun 10 17:05:18 2012 UTC (11 years, 8 months ago) by mlelstv
Branch: MAIN
Changes since 1.140: +4 -4 lines
Diff to previous 1.140 (colored)

Make detection of root on wedges (dk(4)) machine independent. Remove
MD code for x86, xen, sparc64.

Revision 1.139.4.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:08:51 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.139: +3 -1 lines
Diff to previous 1.139 (colored)

sync with head

Revision 1.140 / (download) - annotate - [select for diffs], Sun Nov 13 22:05:58 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, 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
Branch point for: netbsd-6
Changes since 1.139: +3 -1 lines
Diff to previous 1.139 (colored)

add getdiskinfo a companion utility to getdisksize.

Revision 1.137.2.1 / (download) - annotate - [select for diffs], Mon Jun 6 09:10:10 2011 UTC (12 years, 9 months ago) by jruoho
Branch: jruoho-x86intr
Changes since 1.137: +2 -6 lines
Diff to previous 1.137 (colored) next main 1.138 (colored)

Sync with HEAD.

Revision 1.135.2.4 / (download) - annotate - [select for diffs], Tue May 31 03:05:12 2011 UTC (12 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.135.2.3: +1 -1 lines
Diff to previous 1.135.2.3 (colored) to branchpoint 1.135 (colored) next main 1.136 (colored)

sync with head

Revision 1.139 / (download) - annotate - [select for diffs], Sun Apr 24 18:46:24 2011 UTC (12 years, 10 months ago) by rmind
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, rmind-uvmplock-nbase, rmind-uvmplock-base, cherry-xenmp-base, cherry-xenmp
Branch point for: yamt-pagecache
Changes since 1.138: +2 -2 lines
Diff to previous 1.138 (colored)

- Replace few malloc(9) uses with kmem(9).
- Rename buf_malloc() to buf_alloc(), fix comments.
- Remove some unnecessary inclusions.

Revision 1.135.2.3 / (download) - annotate - [select for diffs], Sat Mar 5 20:56:23 2011 UTC (13 years ago) by rmind
Branch: rmind-uvmplock
Changes since 1.135.2.2: +1 -5 lines
Diff to previous 1.135.2.2 (colored) to branchpoint 1.135 (colored)

sync with head

Revision 1.137.4.1 / (download) - annotate - [select for diffs], Tue Feb 8 16:20:04 2011 UTC (13 years ago) by bouyer
Branch: bouyer-quota2
Changes since 1.137: +1 -5 lines
Diff to previous 1.137 (colored) next main 1.138 (colored)

Sync with HEAD

Revision 1.138 / (download) - annotate - [select for diffs], Mon Jan 31 23:07:17 2011 UTC (13 years, 1 month ago) by dyoung
Branch: MAIN
CVS Tags: uebayasi-xip-base7, bouyer-quota2-nbase, bouyer-quota2-base
Changes since 1.137: +1 -5 lines
Diff to previous 1.137 (colored)

Let the linker instead of the C preprocessor configure the kernel: make
weak aliases device_register(9) and device_register_post_config(9)
for the stub routine voidop().  Get rid of __HAVE_DEVICE_REGISTER and
__HAVE_DEVICE_REGISTER_POST_CONFIG.

Revision 1.112.6.2 / (download) - annotate - [select for diffs], Fri Jan 7 06:33:44 2011 UTC (13 years, 2 months ago) by riz
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
Changes since 1.112.6.1: +2 -1 lines
Diff to previous 1.112.6.1 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored)

Pull up following revision(s) (requested by mrg in ticket #1520):
	sys/sys/device.h: revision 1.133
	sys/kern/subr_disk.c: patch
Add helper function that determines the size and block size of a disk device.
For now we query
- the disk label
- the wedge info and data from disk(9)

Revision 1.133.2.2 / (download) - annotate - [select for diffs], Tue Aug 17 06:48:06 2010 UTC (13 years, 6 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.133.2.1: +2 -0 lines
Diff to previous 1.133.2.1 (colored) to branchpoint 1.133 (colored) next main 1.134 (colored)

Sync with HEAD.

Revision 1.109.4.6 / (download) - annotate - [select for diffs], Wed Aug 11 22:55:10 2010 UTC (13 years, 6 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.109.4.5: +7 -1 lines
Diff to previous 1.109.4.5 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored)

sync with head.

Revision 1.135.2.2 / (download) - annotate - [select for diffs], Sat Jul 3 01:20:03 2010 UTC (13 years, 8 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.135.2.1: +3 -1 lines
Diff to previous 1.135.2.1 (colored) to branchpoint 1.135 (colored)

sync with head

Revision 1.137 / (download) - annotate - [select for diffs], Fri Jun 25 15:10:42 2010 UTC (13 years, 8 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base6, uebayasi-xip-base5, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, matt-mips64-premerge-20101231, jruoho-x86intr-base
Branch point for: jruoho-x86intr, bouyer-quota2
Changes since 1.136: +3 -1 lines
Diff to previous 1.136 (colored)

Add config_mountroot(9), which defers device configuration
after mountroot(), like config_interrupt(9) that defers
configuration after interrupts are enabled.
This will be used for devices that require firmware loaded
from the root file system by firmload(9) to complete device
initialization (getting MAC address etc).

No objection on tech-kern@:
http://mail-index.NetBSD.org/tech-kern/2010/06/18/msg008370.html
and will also fix PR kern/43125.

Revision 1.135.2.1 / (download) - annotate - [select for diffs], Sun May 30 05:18:08 2010 UTC (13 years, 9 months ago) by rmind
Branch: rmind-uvmplock
Changes since 1.135: +5 -1 lines
Diff to previous 1.135 (colored)

sync with head

Revision 1.133.2.1 / (download) - annotate - [select for diffs], Fri Apr 30 14:44:32 2010 UTC (13 years, 10 months ago) by uebayasi
Branch: uebayasi-xip
Changes since 1.133: +33 -26 lines
Diff to previous 1.133 (colored)

Sync with HEAD.

Revision 1.136 / (download) - annotate - [select for diffs], Thu Mar 25 19:23:18 2010 UTC (13 years, 11 months ago) by pooka
Branch: MAIN
CVS Tags: uebayasi-xip-base1
Changes since 1.135: +5 -1 lines
Diff to previous 1.135 (colored)

Add init/fini for components (modules etc.).  These eat the standard
driver/attach/data typically present and once some locking is grown
in here, these routines can be made to fail or succeed a component
attachment/detachment atomically.

Revision 1.109.4.5 / (download) - annotate - [select for diffs], Thu Mar 11 15:04:41 2010 UTC (13 years, 11 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.109.4.4: +57 -31 lines
Diff to previous 1.109.4.4 (colored) to branchpoint 1.109 (colored)

sync with head

Revision 1.135 / (download) - annotate - [select for diffs], Wed Feb 24 22:38:10 2010 UTC (14 years ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base9
Branch point for: rmind-uvmplock
Changes since 1.134: +27 -26 lines
Diff to previous 1.134 (colored)

A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

Revision 1.134 / (download) - annotate - [select for diffs], Mon Feb 15 20:20:34 2010 UTC (14 years ago) by dyoung
Branch: MAIN
Changes since 1.133: +3 -1 lines
Diff to previous 1.133 (colored)

Extract a subroutine, const char *cfdata_ifattr(cfdata_t cf), that
returns the name of the interface attribute that associates cf with
its parent.  Use cfdata_ifattr() at several sites in the autoconf
code.

Revision 1.133 / (download) - annotate - [select for diffs], Sat Jan 30 11:57:18 2010 UTC (14 years, 1 month ago) by mlelstv
Branch: MAIN
CVS Tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Changes since 1.132: +2 -1 lines
Diff to previous 1.132 (colored)

Add helper function that determines the size and block size of a disk device.
For now we query
- the disk label
- the wedge info and data from disk(9)

Revision 1.132 / (download) - annotate - [select for diffs], Sun Jan 10 20:11:50 2010 UTC (14 years, 1 month ago) by martin
Branch: MAIN
Changes since 1.131: +4 -1 lines
Diff to previous 1.131 (colored)

forgot to commit this - prototype for device_register_post_config()

Revision 1.131 / (download) - annotate - [select for diffs], Fri Jan 8 20:07:14 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.130: +22 -22 lines
Diff to previous 1.130 (colored)

Expand PMF_FN_* macros.

Revision 1.130 / (download) - annotate - [select for diffs], Fri Jan 8 00:09:45 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.129: +3 -1 lines
Diff to previous 1.129 (colored)

Move all copies of ifattr_match() to sys/kern/subr_autoconf.c.

Revision 1.129 / (download) - annotate - [select for diffs], Thu Jan 7 22:39:52 2010 UTC (14 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.128: +3 -1 lines
Diff to previous 1.128 (colored)

Add a do-nothing child-detachment hook, null_childdetached(device_t,
device_t).

Revision 1.128 / (download) - annotate - [select for diffs], Tue Dec 15 03:02:25 2009 UTC (14 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.127: +5 -1 lines
Diff to previous 1.127 (colored)

Per rmind@'s suggestion, avoid an acquire/release-mutex dance by
collecting garbage in two phases:  in the first stage, with
alldevs_mtx held, gather all of the objects to be freed onto a
list.  Drop alldevs_mtx, and in the second stage, free all the
collected objects.

Also per rmind@'s suggestion, remove KASSERT(!mutex_owned(&alldevs_mtx))
throughout, it is not useful.

Find a free unit number and allocate it for a new device_t atomically.
Before, two threads would sometimes find the same free unit number
and race to allocate it.  The loser panicked.  Now there is no
race.

In support of the changes above, extract some new subroutines that
are private to this module: config_unit_nextfree(), config_unit_alloc(),
config_devfree(), config_dump_garbage().

Delete all of the #ifdef __BROKEN_CONFIG_UNIT_USAGE code.  Only
the sun3 port still depends on __BROKEN_CONFIG_UNIT_USAGE, it's
not hard for the port to do without, and port-sun3@ had fair warning
that it was going away (>1 week, or a few years' warning, depending
how far back you look!).

Revision 1.127 / (download) - annotate - [select for diffs], Mon Dec 7 19:45:13 2009 UTC (14 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.126: +1 -2 lines
Diff to previous 1.126 (colored)

Poison future uses of DVACT_ACTIVATE by deleting it.  I deleted the last
"use" of DVACT_ACTIVATE in a driver, yesterday.

Revision 1.126 / (download) - annotate - [select for diffs], Thu Nov 26 20:52:19 2009 UTC (14 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.125: +3 -2 lines
Diff to previous 1.125 (colored)

Add DV_VIRTUAL for non-backed virtual devices and allow to mount
root from a DV_VIRTUAL device.

Revision 1.125 / (download) - annotate - [select for diffs], Thu Nov 12 19:10:30 2009 UTC (14 years, 3 months ago) by dyoung
Branch: MAIN
Changes since 1.124: +5 -2 lines
Diff to previous 1.124 (colored)

Move a device-deactivation pattern that is replicated throughout
the system into config_deactivate(dev): deactivate dev and all of
its descendants.  Block all interrupts while calling each device's
activation hook, ca_activate.  Now it is possible to simplify or
to delete several device-activation hooks throughout the system.

Do not deactivate a driver while detaching it!  If the driver was
already deactivated (because of accidental/emergency removal), let
the driver cope with the knowledge that DVF_ACTIVE has been cleared.
Otherwise, let the driver access the underlying hardware (so that
it can flush caches, restore original register settings, et cetera)
until it exits its device-detachment hook.

Let multiple readers and writers simultaneously access the system's
device_t list, alldevs, from either interrupt or thread context:
postpone changing alldevs linkages and freeing autoconf device
structures until a garbage-collection phase that runs after all
readers & writers have left the list.

Give device iterators (deviter(9)) a consistent view of alldevs no
matter whether device_t's are added and deleted during iteration:
keep a global alldevs generation number.  When an iterator enters
alldevs, record the current generation number in the iterator and
increase the global number.  When a device_t is created, label it
with the current global generation number.  When a device_t is
deleted, add a second label, the current global generation number.
During iteration, compare a device_t's added- and deleted-generation
with the iterator's generation and skip a device_t that was deleted
before the iterator entered the list or added after the iterator
entered the list.

The alldevs generation number is never 0.  The garbage collector
reaps device_t's whose delete-generation number is non-zero.

Make alldevs private to sys/kern/subr_autoconf.c.  Use deviter(9)
to access it.

Revision 1.124 / (download) - annotate - [select for diffs], Mon Sep 21 12:14:47 2009 UTC (14 years, 5 months ago) by pooka
Branch: MAIN
CVS Tags: jym-xensuspend-nbase
Changes since 1.123: +2 -1 lines
Diff to previous 1.123 (colored)

Split config_init() into config_init() and config_init_mi() to help
platforms which want to call config_init() very early in the boot.

Revision 1.123 / (download) - annotate - [select for diffs], Wed Sep 16 22:45:23 2009 UTC (14 years, 5 months ago) by dyoung
Branch: MAIN
Changes since 1.122: +1 -2 lines
Diff to previous 1.122 (colored)

Nothing calls config_activate(9) any longer, so delete it.

Revision 1.122 / (download) - annotate - [select for diffs], Wed Sep 16 16:34:56 2009 UTC (14 years, 5 months ago) by dyoung
Branch: MAIN
Changes since 1.121: +14 -6 lines
Diff to previous 1.121 (colored)

In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together.  Start solidifying some temporary API changes.

1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
   #include it from <sys/pmf.h> instead of <sys/device.h> to break the
   circular dependency between <sys/device.h> and <sys/pmf.h>.

2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
   suspend/resume call.  Start to replace instances of PMF_FN_PROTO,
   PMF_FN_ARGS, et cetera, with a pmf_qual_t.

3. Introduce the notion of a "suspensor," an entity that holds a
   device in suspension.  More than one suspensor may hold a device
   at once.  A device stays suspended as long as at least one
   suspensor holds it.  A device resumes when the last suspensor
   releases it.

   Currently, the kernel defines three suspensors,

   3a the system-suspensor: for system suspension, initiated
      by 'sysctl -w machdep.sleep_state=3', by lid closure, by
      power-button press, et cetera,

   3b the drvctl-suspensor: for device suspension by /dev/drvctl
      ioctl, e.g., drvctl -S sip0.

   3c the system self-suspensor: for device drivers that suspend
      themselves and their children.  Several drivers for network
      interfaces put the network device to sleep while it is not
      administratively up, that is, after the kernel calls if_stop(,
      1).  The self-suspensor should not be used directly.  See
      the description of suspensor delegates, below.

   A suspensor can have one or more "delegates".  A suspensor can
   release devices that its delegates hold suspended.  Right now,
   only the system self-suspensor has delegates.  For each device
   that a self-suspending driver attaches, it creates the device's
   self-suspensor, a delegate of the system self-suspensor.

   Suspensors stop a system-wide suspend/resume cycle from waking
   devices that the operator put to sleep with drvctl before the cycle.
   They also help self-suspension to work more simply, safely, and in
   accord with expectations.

4. Add the notion of device activation level, devact_level_t,
   and a routine for checking the current activation level,
   device_activation().  Current activation levels are DEVACT_LEVEL_BUS,
   DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
   indicate that the device's bus is active, that the bus and device are
   active, and that the bus, device, and the functions of the device's
   class (network, audio) are active.

   Suspend/resume calls can be qualified with a devact_level_t.
   The power-management framework treats a devact_level_t that
   qualifies a device suspension as the device's current activation
   level; it only runs hooks to reduce the activation level from
   the presumed current level to the fully suspended state.  The
   framework treats a devact_level_t qualifying device resumption
   as the target activation level; it only runs hooks to raise the
   activation level to the target.

5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
   drivers.

6. Temporarily add an unused power-management workqueue that I will
   remove or replace, soon.

Revision 1.109.4.4 / (download) - annotate - [select for diffs], Wed Sep 16 13:38:06 2009 UTC (14 years, 5 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.109.4.3: +5 -3 lines
Diff to previous 1.109.4.3 (colored) to branchpoint 1.109 (colored)

sync with head

Revision 1.121 / (download) - annotate - [select for diffs], Thu Sep 3 15:20:08 2009 UTC (14 years, 6 months ago) by pooka
Branch: MAIN
CVS Tags: yamt-nfs-mp-base8
Changes since 1.120: +5 -3 lines
Diff to previous 1.120 (colored)

Move configure() and configure2() from subr_autoconf.c to init_main.c,
since they are only peripherially related to the autoconf subsystem
and more related to boot initialization.  Also, apply _KERNEL_OPT
to autoconf where necessary.

Revision 1.115.4.2 / (download) - annotate - [select for diffs], Thu Jul 23 23:32:56 2009 UTC (14 years, 7 months ago) by jym
Branch: jym-xensuspend
Changes since 1.115.4.1: +9 -1 lines
Diff to previous 1.115.4.1 (colored) to branchpoint 1.115 (colored) next main 1.116 (colored)

Sync with HEAD.

Revision 1.109.4.3 / (download) - annotate - [select for diffs], Sat Jul 18 14:53:26 2009 UTC (14 years, 7 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.109.4.2: +9 -1 lines
Diff to previous 1.109.4.2 (colored) to branchpoint 1.109 (colored)

sync with head.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Jun 26 19:30:45 2009 UTC (14 years, 8 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base7, yamt-nfs-mp-base6, jymxensuspend-base
Changes since 1.119: +9 -1 lines
Diff to previous 1.119 (colored)

Switch to kmem(9).

(void *)pew is one way to get a struct work *, but let's
write&pew->pew_work, instead.  It is more defensive and persuasive.

Make miscellaneous changes in support of tearing down arbitrary
stacks of filesystems and devices during shutdown:

1 Move struct shutdown_state, shutdown_first(), and shutdown_next(),
  from kern_pmf.c to subr_autoconf.c.  Rename detach_all() to
  config_detach_all(), and move it from kern_pmf.c to subr_autoconf.c.
  Export all of those routines.

2 In pmf_system_shutdown(), do not suspend user process scheduling, and
  do not detach all devices: I am going to do that in cpu_reboot(),
  instead.  (Soon I will do it in an MI cpu_reboot() routine.)  Do still
  call PMF shutdown hooks.

3 In config_detach(), add a DIAGNOSTIC assertion: if we're exiting
  config_detach() at the bottom, alldevs_nwrite had better not be 0,
  because config_detach() is a writer of the device list.

4 In deviter_release(), check to see if we're iterating the device list
  for reading, *first*, and if so, decrease the number of readers.  Used
  to be that if we happened to be reading during shutdown, we ran the
  shutdown branch.  Thus the number of writers reached 0, the number
  of readers remained > 0, and no writer could iterate again.  Under
  certain circumstances that would cause a hang during shutdown.

Revision 1.109.4.2 / (download) - annotate - [select for diffs], Sat May 16 10:41:52 2009 UTC (14 years, 9 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.109.4.1: +5 -14 lines
Diff to previous 1.109.4.1 (colored) to branchpoint 1.109 (colored)

sync with head

Revision 1.115.4.1 / (download) - annotate - [select for diffs], Wed May 13 17:23:03 2009 UTC (14 years, 9 months ago) by jym
Branch: jym-xensuspend
Changes since 1.115: +31 -14 lines
Diff to previous 1.115 (colored)

Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.119 / (download) - annotate - [select for diffs], Thu May 7 22:17:41 2009 UTC (14 years, 10 months ago) by cegger
Branch: MAIN
CVS Tags: yamt-nfs-mp-base5, yamt-nfs-mp-base4, jym-xensuspend-base
Changes since 1.118: +4 -8 lines
Diff to previous 1.118 (colored)

CFATTACH_DECL2 is no longer used. remove it.
ok dyoung@

Revision 1.118 / (download) - annotate - [select for diffs], Tue May 5 21:40:25 2009 UTC (14 years, 10 months ago) by cegger
Branch: MAIN
Changes since 1.117: +4 -9 lines
Diff to previous 1.117 (colored)

CFATTACH_DECL3 is no longer used.
ok dyoung@

Revision 1.109.4.1 / (download) - annotate - [select for diffs], Mon May 4 08:14:34 2009 UTC (14 years, 10 months ago) by yamt
Branch: yamt-nfs-mp
Changes since 1.109: +42 -15 lines
Diff to previous 1.109 (colored)

sync with head.

Revision 1.112.4.3 / (download) - annotate - [select for diffs], Tue Apr 28 07:37:52 2009 UTC (14 years, 10 months ago) by skrll
Branch: nick-hppapmap
Changes since 1.112.4.2: +34 -9 lines
Diff to previous 1.112.4.2 (colored) to branchpoint 1.112 (colored) next main 1.113 (colored)

Sync with HEAD.

Revision 1.117 / (download) - annotate - [select for diffs], Thu Apr 2 00:09:34 2009 UTC (14 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base
Changes since 1.116: +34 -9 lines
Diff to previous 1.116 (colored)

During shutdown, detach devices in an orderly fashion.

Call the detach routine for every device in the device tree, starting
with the leaves and moving toward the root, expecting that each
(pseudo-)device driver will use the opportunity to gracefully commit
outstandings transactions to the underlying (pseudo-)device and to
relinquish control of the hardware to the system BIOS.

Detaching devices is not suitable for every shutdown: in an emergency,
or if the system state is inconsistent, we should resort to a fast,
simple shutdown that uses only the pmf(9) shutdown hooks and the
(deprecated) shutdownhooks.  For now, if the flag RB_NOSYNC is set in
boothowto, opt for the fast, simple shutdown.

Add a device flag, DVF_DETACH_SHUTDOWN, that indicates by its presence
that it is safe to detach a device during shutdown.  Introduce macros
CFATTACH_DECL3() and CFATTACH_DECL3_NEW() for creating autoconf
attachments with default device flags.  Add DVF_DETACH_SHUTDOWN
to configuration attachments for atabus(4), atw(4) at cardbus(4),
cardbus(4), cardslot(4), com(4) at isa(4), elanpar(4), elanpex(4),
elansc(4), gpio(4), npx(4) at isa(4), nsphyter(4), pci(4), pcib(4),
pcmcia(4), ppb(4), sip(4), wd(4), and wdc(4) at isa(4).

Add a device-detachment "reason" flag, DETACH_SHUTDOWN, that tells the
autoconf code and a device driver that the reason for detachment is
system shutdown.

Add a sysctl, kern.detachall, that tells the system to try to detach
every device at shutdown, regardless of any device's DVF_DETACH_SHUTDOWN
flag.  The default for kern.detachall is 0.  SET IT TO 1, PLEASE, TO
HELP TEST AND DEBUG DEVICE DETACHMENT AT SHUTDOWN.

This is a work in progress.  In future work, I aim to treat
pseudo-devices more thoroughly, and to gracefully tear down a stack of
(pseudo-)disk drivers and filesystems, including cgd(4), vnd(4), and
raid(4) instances at shutdown.

Also commit some changes that are not easily untangled from the rest:

(1) begin to simplify device_t locking: rename struct pmf_private to
device_lock, and incorporate device_lock into struct device.

(2) #include <sys/device.h> in sys/pmf.h in order to get some
definitions that it needs.  Stop unnecessarily #including <sys/device.h>
in sys/arch/x86/include/pic.h to keep the amd64, xen, and i386 releases
building.

Revision 1.112.6.1 / (download) - annotate - [select for diffs], Sun Mar 15 19:43:48 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: 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-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-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.112: +2 -1 lines
Diff to previous 1.112 (colored)

Pull up following revision(s) (requested by christos in ticket #458):
	sys/conf/Makefile.kern.inc: revision 1.121
	sys/conf/files: revision 1.940
	sys/kern/init_main.c: revision 1.381
	sys/kern/kern_ssp.c: revision 1.1
	sys/kern/subr_autoconf.c: revision 1.168
	sys/sys/device.h: revision 1.116
	sys/sys/systm.h: revision 1.233
Unbreak ssp kernels. The issue here that when the ssp_init() call was
deferred, it caused the return from the enclosing function to break, as
well as the ssp return on i386. To fix both issues, split configure in
two pieces the one before calling ssp_init and the one after, and move
the ssp_init() call back in main. Put ssp_init() in its own file, and
compile this new file with -fno-stack-protector. Tested on amd64.
XXX: If we want to have ssp kernels working on 5.0, this change needs to
be pulled up.

Revision 1.112.4.2 / (download) - annotate - [select for diffs], Tue Mar 3 18:34:31 2009 UTC (15 years ago) by skrll
Branch: nick-hppapmap
Changes since 1.112.4.1: +2 -1 lines
Diff to previous 1.112.4.1 (colored) to branchpoint 1.112 (colored)

Sync with HEAD.

Revision 1.116 / (download) - annotate - [select for diffs], Thu Feb 12 18:24:18 2009 UTC (15 years ago) by christos
Branch: MAIN
CVS Tags: nick-hppapmap-base2
Changes since 1.115: +2 -1 lines
Diff to previous 1.115 (colored)

Unbreak ssp kernels. The issue here that when the ssp_init() call was deferred,
it caused the return from the enclosing function to break, as well as the
ssp return on i386. To fix both issues, split configure in two pieces
the one before calling ssp_init and the one after, and move the ssp_init()
call back in main. Put ssp_init() in its own file, and compile this new file
with -fno-stack-protector. Tested on amd64.
XXX: If we want to have ssp kernels working on 5.0, this change needs to
be pulled up.

Revision 1.112.4.1 / (download) - annotate - [select for diffs], Mon Jan 19 13:20:29 2009 UTC (15 years, 1 month ago) by skrll
Branch: nick-hppapmap
Changes since 1.112: +5 -3 lines
Diff to previous 1.112 (colored)

Sync with HEAD.

Revision 1.103.6.6 / (download) - annotate - [select for diffs], Sat Jan 17 13:29:40 2009 UTC (15 years, 1 month ago) by mjf
Branch: mjf-devfs2
Changes since 1.103.6.5: +4 -2 lines
Diff to previous 1.103.6.5 (colored) to branchpoint 1.103 (colored) next main 1.104 (colored)

Sync with HEAD.

Revision 1.112.2.1 / (download) - annotate - [select for diffs], Sat Dec 13 01:15:35 2008 UTC (15 years, 2 months ago) by haad
Branch: haad-dm
Changes since 1.112: +5 -3 lines
Diff to previous 1.112 (colored) next main 1.113 (colored)

Update haad-dm branch to haad-dm-base2.

Revision 1.115 / (download) - annotate - [select for diffs], Thu Nov 13 21:15:01 2008 UTC (15 years, 3 months ago) by dyoung
Branch: MAIN
CVS Tags: mjf-devfs2-base, haad-nbase2, haad-dm-base2, haad-dm-base, ad-audiomp2-base, ad-audiomp2
Branch point for: jym-xensuspend
Changes since 1.114: +3 -1 lines
Diff to previous 1.114 (colored)

Only define 'struct device' if _KERNEL is #defined, so that I can
add a kmutex_t and a kcondvar_t to struct device, later, without
breaking userland.  Userland does not use struct device.

Revision 1.114 / (download) - annotate - [select for diffs], Wed Nov 12 12:36:28 2008 UTC (15 years, 3 months ago) by ad
Branch: MAIN
Changes since 1.113: +2 -2 lines
Diff to previous 1.113 (colored)

Remove LKMs and switch to the module framework, pass 1.

Proposed on tech-kern@.

Revision 1.113 / (download) - annotate - [select for diffs], Thu Nov 6 03:40:04 2008 UTC (15 years, 4 months ago) by dyoung
Branch: MAIN
Changes since 1.112: +2 -2 lines
Diff to previous 1.112 (colored)

Use DVUNIT_ANY instead of the anonymous constant -1.

Revision 1.103.6.5 / (download) - annotate - [select for diffs], Sun Jun 29 09:33:20 2008 UTC (15 years, 8 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.103.6.4: +2 -2 lines
Diff to previous 1.103.6.4 (colored) to branchpoint 1.103 (colored)

Sync with HEAD.

Revision 1.109.6.1 / (download) - annotate - [select for diffs], Mon Jun 23 04:32:02 2008 UTC (15 years, 8 months ago) by wrstuden
Branch: wrstuden-revivesa
Changes since 1.109: +4 -5 lines
Diff to previous 1.109 (colored) next main 1.110 (colored)

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

Revision 1.111.2.1 / (download) - annotate - [select for diffs], Wed Jun 18 16:33:51 2008 UTC (15 years, 8 months ago) by simonb
Branch: simonb-wapbl
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored) next main 1.112 (colored)

Sync with head.

Revision 1.109.2.2 / (download) - annotate - [select for diffs], Tue Jun 17 09:15:16 2008 UTC (15 years, 8 months ago) by yamt
Branch: yamt-pf42
Changes since 1.109.2.1: +3 -3 lines
Diff to previous 1.109.2.1 (colored) to branchpoint 1.109 (colored) next main 1.110 (colored)

sync with head.

Revision 1.112 / (download) - annotate - [select for diffs], Wed Jun 11 15:56:11 2008 UTC (15 years, 8 months ago) by drochner
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, netbsd-5-base, netbsd-5-0-RC2, netbsd-5-0-RC1, matt-mips64-base2, haad-dm-base1
Branch point for: nick-hppapmap, netbsd-5, haad-dm
Changes since 1.111: +3 -3 lines
Diff to previous 1.111 (colored)

tighten type checking: use device_t instead of void* at some places

Revision 1.109.2.1 / (download) - annotate - [select for diffs], Wed Jun 4 02:05:49 2008 UTC (15 years, 9 months ago) by yamt
Branch: yamt-pf42
Changes since 1.109: +2 -3 lines
Diff to previous 1.109 (colored)

sync with head

Revision 1.103.6.4 / (download) - annotate - [select for diffs], Mon Jun 2 13:24:32 2008 UTC (15 years, 9 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.103.6.3: +1 -2 lines
Diff to previous 1.103.6.3 (colored) to branchpoint 1.103 (colored)

Sync with HEAD.

Revision 1.111 / (download) - annotate - [select for diffs], Tue May 27 17:47:37 2008 UTC (15 years, 9 months ago) by ad
Branch: MAIN
CVS Tags: yamt-pf42-base3
Branch point for: simonb-wapbl
Changes since 1.110: +1 -3 lines
Diff to previous 1.110 (colored)

Don't expose config_pending.

Revision 1.110 / (download) - annotate - [select for diffs], Sun May 25 12:30:40 2008 UTC (15 years, 9 months ago) by jmcneill
Branch: MAIN
Changes since 1.109: +2 -1 lines
Diff to previous 1.109 (colored)

Add DRVGETEVENT support for /dev/drvctl, based on devmon support by
Jachym Holecek for Google Summer of Code. DRVGETEVENT plist is currently
limited to event type, device name, and device parent name.

Revision 1.103.6.3 / (download) - annotate - [select for diffs], Thu Apr 3 12:43:11 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.103.6.2: +63 -18 lines
Diff to previous 1.103.6.2 (colored) to branchpoint 1.103 (colored)

Sync with HEAD.

Revision 1.103.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:16:28 2008 UTC (15 years, 11 months ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.103: +63 -18 lines
Diff to previous 1.103 (colored) next main 1.104 (colored)

sync with head.

Revision 1.97.2.3 / (download) - annotate - [select for diffs], Sun Mar 23 02:05:10 2008 UTC (15 years, 11 months ago) by matt
Branch: matt-armv6
Changes since 1.97.2.2: +66 -20 lines
Diff to previous 1.97.2.2 (colored) to branchpoint 1.97 (colored) next main 1.98 (colored)

sync with HEAD

Revision 1.103.6.2 / (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.103.6.1: +1 -2 lines
Diff to previous 1.103.6.1 (colored) to branchpoint 1.103 (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.75.2.9 / (download) - annotate - [select for diffs], Mon Mar 17 09:15:47 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.8: +63 -18 lines
Diff to previous 1.75.2.8 (colored) next main 1.76 (colored)

sync with head.

Revision 1.109 / (download) - annotate - [select for diffs], Wed Mar 12 18:02:22 2008 UTC (15 years, 11 months ago) by dyoung
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base2, yamt-pf42-base, yamt-nfs-mp-base2, yamt-nfs-mp-base, yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-nbase, ad-socklock-base1
Branch point for: yamt-pf42, yamt-nfs-mp, wrstuden-revivesa
Changes since 1.108: +7 -1 lines
Diff to previous 1.108 (colored)

Use device_t and its accessors throughout.  Use aprint_*_dev().

Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.

Revision 1.108 / (download) - annotate - [select for diffs], Tue Mar 11 02:42:41 2008 UTC (15 years, 11 months ago) by matt
Branch: MAIN
Changes since 1.107: +2 -1 lines
Diff to previous 1.107 (colored)

Add device_lookup_private() which is just device_private(device_lookup(&cd, i))
Most callers don't want the device_t, they want their softc and that's what
device_lookup_private returns.

Revision 1.107 / (download) - annotate - [select for diffs], Fri Mar 7 07:03:06 2008 UTC (16 years ago) by dyoung
Branch: MAIN
Changes since 1.106: +7 -1 lines
Diff to previous 1.106 (colored)

PMF: synchronize device suspension and resumption.

Revision 1.106 / (download) - annotate - [select for diffs], Wed Mar 5 07:09:18 2008 UTC (16 years ago) by dyoung
Branch: MAIN
Changes since 1.105: +24 -1 lines
Diff to previous 1.105 (colored)

Synchronize readers and writers of the device tree.

Add a device iterator object, deviter_t, and methods deviter_init(),
deviter_first(), and deviter_next() for visiting each device in
the device tree.

Take care not to re-shutdown a device in the event that the machine
panics during reboot and the operator types 'reboot' at the kernel
debugger prompt.

While I'm here, sprinkle PMF_FN_ARGS, PMF_FN_PROTO, et cetera.

Revision 1.105 / (download) - annotate - [select for diffs], Wed Mar 5 04:54:24 2008 UTC (16 years ago) by dyoung
Branch: MAIN
Changes since 1.104: +20 -17 lines
Diff to previous 1.104 (colored)

Introduce PMF_FN_{ARGS,PROTO}1, and use PMF_FN_{ARGS,PROTO} more
widely, further helping me to introduce PMF API changes piecemeal.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Feb 28 14:25:12 2008 UTC (16 years ago) by drochner
Branch: MAIN
Changes since 1.103: +8 -2 lines
Diff to previous 1.103 (colored)

Extend the pmf suspend/resume hooks by a shutdown method, so drivers
can register a shutdown handler explicitely.
Install a pci bus shutdown handler which disables bus master accesses
for all childs, so the drivers don't need to care.
This will hopefully be sufficient to replace the shutdownhooks
(together with the powerhooks). (It has been suggested to use some
general event notification framework for shutdown handlers, but there
might be cases where shutdown handlers must be run in an order following
the device hierarchy, which wouldn't be easy with event handlers
not tied to drivers.)
approved by David Young

Revision 1.75.2.8 / (download) - annotate - [select for diffs], Wed Feb 27 08:37:05 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.7: +4 -1 lines
Diff to previous 1.75.2.7 (colored)

sync with head.

Revision 1.103.6.1 / (download) - annotate - [select for diffs], Thu Feb 21 20:44:55 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs2
Changes since 1.103: +2 -1 lines
Diff to previous 1.103 (colored)

Start where the mjf-devfs branch left off.

Revision 1.98.4.2 / (download) - annotate - [select for diffs], Mon Feb 18 22:07:03 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.98.4.1: +2 -1 lines
Diff to previous 1.98.4.1 (colored) to branchpoint 1.98 (colored) next main 1.99 (colored)

Add some devfs code that's been sitting in my local tree for a while.

devfsd(8) is now the first daemon to be started after init(8). It tracks
device insertion (will eventually track removal) and devfs mounts.

Currently, we can mount multiple device file systems and have device
special files pushed into the mounts automatically, though, the device
special files aren't created with the correct major/minor number pairs
yet.

More work to come soon.

Revision 1.98.4.1 / (download) - annotate - [select for diffs], Mon Feb 18 21:07:23 2008 UTC (16 years ago) by mjf
Branch: mjf-devfs
Changes since 1.98: +35 -1 lines
Diff to previous 1.98 (colored)

Sync with HEAD.

Revision 1.103 / (download) - annotate - [select for diffs], Tue Feb 12 17:30:59 2008 UTC (16 years ago) by joerg
Branch: MAIN
CVS Tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.102: +4 -1 lines
Diff to previous 1.102 (colored)

Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.

Revision 1.75.2.7 / (download) - annotate - [select for diffs], Mon Feb 11 15:00:09 2008 UTC (16 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.6: +1 -3 lines
Diff to previous 1.75.2.6 (colored)

sync with head.

Revision 1.102 / (download) - annotate - [select for diffs], Wed Feb 6 20:24:17 2008 UTC (16 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.101: +1 -3 lines
Diff to previous 1.101 (colored)

The tricks done in device_foreach_child() still don't make it safe to use
by config_detach_children(), because the latter can work recursively
and remove any number of devices, so rewrite config_detach_children()
to restart list traversal after each call of config_detach(), and since
only one user of device_foreach_child() is left (in kern_drvctl.c),
and it is simpler to open-code the loop than to deal with callbacks,
just remove it.

Revision 1.75.2.6 / (download) - annotate - [select for diffs], Mon Jan 21 09:47:47 2008 UTC (16 years, 1 month ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.5: +82 -5 lines
Diff to previous 1.75.2.5 (colored)

sync with head

Revision 1.97.2.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:58:06 2008 UTC (16 years, 1 month ago) by matt
Branch: matt-armv6
Changes since 1.97.2.1: +82 -5 lines
Diff to previous 1.97.2.1 (colored) to branchpoint 1.97 (colored)

sync with HEAD

Revision 1.99.2.1 / (download) - annotate - [select for diffs], Wed Jan 2 21:57:58 2008 UTC (16 years, 2 months ago) by bouyer
Branch: bouyer-xeni386
CVS Tags: bouyer-xeni386-merge1
Changes since 1.99: +7 -1 lines
Diff to previous 1.99 (colored) next main 1.100 (colored)

Sync with HEAD

Revision 1.98.6.1 / (download) - annotate - [select for diffs], Wed Dec 26 19:57:53 2007 UTC (16 years, 2 months ago) by ad
Branch: vmlocking2
Changes since 1.98: +82 -5 lines
Diff to previous 1.98 (colored) next main 1.99 (colored)

Sync with head.

Revision 1.101 / (download) - annotate - [select for diffs], Sun Dec 16 23:24:21 2007 UTC (16 years, 2 months ago) by drochner
Branch: MAIN
CVS Tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-nbase, bouyer-xeni386-base
Changes since 1.100: +3 -1 lines
Diff to previous 1.100 (colored)

don't include <sys/pmf.h> for userland programs, saves some recompilation
if internals are changed

Revision 1.100 / (download) - annotate - [select for diffs], Sun Dec 16 20:49:52 2007 UTC (16 years, 2 months ago) by dyoung
Branch: MAIN
Changes since 1.99: +5 -1 lines
Diff to previous 1.99 (colored)

Add config_deferred() for forcing the deferred configuration to
run, which we need to do from drvctl(4) sometimes.

Add device_foreach_child() for calling a function on each child of
a device_t.

Add config_detach_children() for detaching all of the children of
a device (uses device_foreach_child()).

Revision 1.99.4.1 / (download) - annotate - [select for diffs], Sun Dec 16 18:54:07 2007 UTC (16 years, 2 months ago) by cube
Branch: cube-autoconf
Changes since 1.99: +3 -281 lines
Diff to previous 1.99 (colored) next main 1.100 (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.98.8.1 / (download) - annotate - [select for diffs], Tue Dec 11 15:45:41 2007 UTC (16 years, 2 months ago) by yamt
Branch: yamt-kmem
Changes since 1.98: +76 -5 lines
Diff to previous 1.98 (colored) next main 1.99 (colored)

sync with head.

Revision 1.99 / (download) - annotate - [select for diffs], Sun Dec 9 20:28:44 2007 UTC (16 years, 2 months ago) by jmcneill
Branch: MAIN
CVS Tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base
Branch point for: cube-autoconf, bouyer-xeni386
Changes since 1.98: +76 -5 lines
Diff to previous 1.98 (colored)

Merge jmcneill-pm branch.

Revision 1.96.6.7 / (download) - annotate - [select for diffs], Sat Dec 8 16:21:41 2007 UTC (16 years, 3 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.96.6.6: +19 -19 lines
Diff to previous 1.96.6.6 (colored) to branchpoint 1.96 (colored) next main 1.97 (colored)

Rename pnp(9) -> pmf(9), as requested by many.

Revision 1.96.6.6 / (download) - annotate - [select for diffs], Wed Nov 7 01:14:14 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.96.6.5: +2 -1 lines
Diff to previous 1.96.6.5 (colored) to branchpoint 1.96 (colored)

Introduce device_has_power to fix a race between resuming a device and
the device enabling interrupts as seen by jmcneill@ with uhci. Change
ehci, ohci, uhci and azalia to use this function to protect the
interrupt handler.

Revision 1.97.2.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:34:45 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.97: +17 -4 lines
Diff to previous 1.97 (colored)

sync with HEAD

Revision 1.96.6.5 / (download) - annotate - [select for diffs], Tue Nov 6 14:27:37 2007 UTC (16 years, 4 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.96.6.4: +68 -8 lines
Diff to previous 1.96.6.4 (colored) to branchpoint 1.96 (colored)

Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
  three layers (class logic, device logic, bus logic), all of them being
  optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
  not suspended (even partially), device_is_enabled returns true if the
  device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
  pnp_system_resume. Before running any suspend/resume handlers, check
  that all currently attached devices support power management and bail
  out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
  can register what events they are interested in and whether the handler
  should be global or not.
- Introduce device_active API for devices to mark themselve in use from
  either the system or the device. Use this to implement the idle handling
  for audio and input devices. This is intended to replace most ad-hoc
  watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
  shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
  well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
  break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.

Revision 1.75.2.5 / (download) - annotate - [select for diffs], Sat Oct 27 11:36:28 2007 UTC (16 years, 4 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.4: +17 -4 lines
Diff to previous 1.75.2.4 (colored)

sync with head.

Revision 1.94.2.2 / (download) - annotate - [select for diffs], Tue Oct 9 13:45:07 2007 UTC (16 years, 4 months ago) by ad
Branch: vmlocking
Changes since 1.94.2.1: +33 -7 lines
Diff to previous 1.94.2.1 (colored) to branchpoint 1.94 (colored) next main 1.95 (colored)

Sync with head.

Revision 1.97.4.1 / (download) - annotate - [select for diffs], Sat Oct 6 15:28:39 2007 UTC (16 years, 5 months ago) by yamt
Branch: yamt-x86pmap
Changes since 1.97: +17 -4 lines
Diff to previous 1.97 (colored) next main 1.98 (colored)

sync with head.

Revision 1.96.6.4 / (download) - annotate - [select for diffs], Tue Oct 2 18:29:26 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.96.6.3: +17 -4 lines
Diff to previous 1.96.6.3 (colored) to branchpoint 1.96 (colored)

Sync with HEAD.

Revision 1.96.6.3 / (download) - annotate - [select for diffs], Mon Oct 1 05:38:09 2007 UTC (16 years, 5 months ago) by joerg
Branch: jmcneill-pm
Changes since 1.96.6.2: +4 -1 lines
Diff to previous 1.96.6.2 (colored) to branchpoint 1.96 (colored)

Extend device API by device_power_private and device_power_set_private.
The latter is a temporary mean until the pnp_register API itself is
overhault. This functions allow a generic power handler to store its
state independent of the driver.

Use this and revamp the PCI power handling. Pretty much all PCI devices
had power handlers that did the same thing, generalize this in
pci_generic_power_register/deregister and the handler. This interface
offers callbacks for the drivers to save and restore state on
transistions. After a long discussion with jmcneill@ it was considered
to be powerful enough until evidence is shown that devices can handle
D1/D2 with less code and higher speed than without the full
save/restore. The generic code is carefully written to handle device
without PCI-PM support and ensure that the correct registers are written
to when D3 loses all state.

Reimplement the generic PCI network device handling on
top of PCI generic power handling.

Introduce pci_disable_retry as used and implemented locally at least by
ath(4) and iwi(4). Use it in this drivers to restore behaviour from
before the introduction of generic PCI network handling.

Convert all PCI drivers that were using pnp_register to the new
framework. The only exception is vga(4) as it is commonly used as
console device. Add a note therein that this should be fixed later.

Revision 1.98 / (download) - annotate - [select for diffs], Mon Sep 24 18:47:57 2007 UTC (16 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-x86pmap-base4, yamt-x86pmap-base3, yamt-x86pmap-base2, yamt-kmem-base, vmlocking2-base2, vmlocking2-base1, vmlocking-nbase, vmlocking-base, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: yamt-kmem, vmlocking2, mjf-devfs
Changes since 1.97: +17 -4 lines
Diff to previous 1.97 (colored)

Introduce CFATTACH_DECL_NEW and CFATTACH_DECL2_NEW for drivers that
don't expect struct device as first field of softc. device_private uses
a new field of struct device to give the softc address and that field is
either set the struct device for old-style devices or a separate
allocation by config_devalloc. Both macros are intended as temporary
bandaid until all drivers are converted and will be removed later.

Revision 1.96.6.2 / (download) - annotate - [select for diffs], Mon Sep 3 16:49:11 2007 UTC (16 years, 6 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.96.6.1: +18 -5 lines
Diff to previous 1.96.6.1 (colored) to branchpoint 1.96 (colored)

Sync with HEAD.

Revision 1.75.2.4 / (download) - annotate - [select for diffs], Mon Sep 3 14:46:06 2007 UTC (16 years, 6 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.3: +22 -7 lines
Diff to previous 1.75.2.3 (colored)

sync with head.

Revision 1.96.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 10:23:59 2007 UTC (16 years, 6 months ago) by skrll
Branch: nick-csl-alignment
Changes since 1.96: +18 -5 lines
Diff to previous 1.96 (colored) next main 1.97 (colored)

Sync with HEAD.

Revision 1.97 / (download) - annotate - [select for diffs], Sun Aug 26 18:20:57 2007 UTC (16 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Changes since 1.96: +18 -5 lines
Diff to previous 1.96 (colored)

Change CFATTACH_DECL, CFATTACH_DECL2, and CFDRIVER_DECL to use C99 structure
initializers.

Revision 1.96.6.1 / (download) - annotate - [select for diffs], Fri Aug 3 22:17:29 2007 UTC (16 years, 7 months ago) by jmcneill
Branch: jmcneill-pm
Changes since 1.96: +10 -3 lines
Diff to previous 1.96 (colored)

Pull in power management changes from private branch.

Revision 1.94.2.1 / (download) - annotate - [select for diffs], Sun Jul 15 13:28:08 2007 UTC (16 years, 7 months ago) by ad
Branch: vmlocking
Changes since 1.94: +5 -2 lines
Diff to previous 1.94 (colored)

Sync with head.

Revision 1.94.4.1 / (download) - annotate - [select for diffs], Wed Jul 11 20:12:24 2007 UTC (16 years, 7 months ago) by mjf
Branch: mjf-ufs-trans
Changes since 1.94: +5 -2 lines
Diff to previous 1.94 (colored) next main 1.95 (colored)

Sync with head.

Revision 1.96 / (download) - annotate - [select for diffs], Mon Jul 9 11:46:21 2007 UTC (16 years, 8 months ago) by tsutsui
Branch: MAIN
CVS Tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Changes since 1.95: +2 -2 lines
Diff to previous 1.95 (colored)

Hmm, pesudo seems pseudo of pseudo.

Revision 1.95 / (download) - annotate - [select for diffs], Sun Jun 24 01:43:35 2007 UTC (16 years, 8 months ago) by dyoung
Branch: MAIN
Changes since 1.94: +4 -1 lines
Diff to previous 1.94 (colored)

Extract common code from i386, xen, and sparc64, creating
config_handle_wedges() and read_disk_sectors().  On x86, handle_wedges()
is a thin wrapper for config_handle_wedges().  Share opendisk()
across architectures.

Add kernel code in support of specifying a root partition by wedge
name.  E.g., root specifications "wedge:wd0a", "wedge:David's Root
Volume" are possible.  (Patches for config(1) coming soon.)

In support of moving disks between architectures (esp. i386 <->
evbmips), I've written a routine convertdisklabel() that ensures
that the raw partition is at RAW_DISK by following these steps:

        0 If we have read a disklabel that has a RAW_PART with
          p_offset == 0 and p_size != 0, then use that raw partition.

        1 If we have read a disklabel that has both partitions 'c'
          and 'd', and RAW_PART has p_offset != 0 or p_size == 0,
          but the other partition is suitable for a raw partition
          (p_offset == 0, p_size != 0), then swap the two partitions
          and use the new raw partition.

        2 If the architecture's raw partition is 'd', and if there
          is no partition 'd', but there is a partition 'c' that
          is suitable for a raw partition, then copy partition 'c'
          to partition 'd'.

        3 Determine the drive's last sector, using either the
          d_secperunit the drive reported, or by guessing (0x1fffffff).
          If we cannot read the drive's last sector, then fail.

        4 If we have read a disklabel that has no partition slot
          RAW_PART, then create a partition RAW_PART.  Make it span
          the whole drive.

        5 If there are fewer than MAXPARTITIONS partitions,
          then "slide" the unsuitable raw partition RAW_PART, and
          subsequent partitions, into partition slots RAW_PART+1
          and subsequent slots.  Create a raw partition at RAW_PART.
          Make it span the whole drive.

The convertdisklabel() procedure can probably stand to be simplified,
but it ought to deal with all but an extraordinarily broken disklabel,
now.

i386: compiled and tested, sparc64: compiled, evbmips: compiled.

Revision 1.92.8.2 / (download) - annotate - [select for diffs], Mon Mar 12 06:00:51 2007 UTC (16 years, 11 months ago) by rmind
Branch: yamt-idlelwp
Changes since 1.92.8.1: +1 -2 lines
Diff to previous 1.92.8.1 (colored) to branchpoint 1.92 (colored) next main 1.93 (colored)

Sync with HEAD.

Revision 1.94 / (download) - annotate - [select for diffs], Mon Mar 5 20:32:43 2007 UTC (17 years ago) by drochner
Branch: MAIN
CVS Tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Changes since 1.93: +1 -2 lines
Diff to previous 1.93 (colored)

Make the attach functions for real and pseudo devices share as much code
as possible. For that, split out a function which does the allocation
of a softc (without linking it into global structures) and a function
which inserts the device into the global alldevs lists and the per-driver
cd_devs.
There is a little semantic change involved: the pseudo-device code didn't
interpret FSTATE_STAR as such, for no good reason. This looks harmless;
I'll modify driver frontends as I find ways to test.
Get config_makeroom() out of the public namespace - that's clearly an
internal of autoconf which drivers can't be allowed to deal with.

Revision 1.92.8.1 / (download) - annotate - [select for diffs], Tue Feb 27 16:55:14 2007 UTC (17 years ago) by yamt
Branch: yamt-idlelwp
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.75.2.3 / (download) - annotate - [select for diffs], Mon Feb 26 09:12:11 2007 UTC (17 years ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.2: +3 -3 lines
Diff to previous 1.75.2.2 (colored)

sync with head.

Revision 1.93 / (download) - annotate - [select for diffs], Wed Feb 21 23:00:09 2007 UTC (17 years ago) by thorpej
Branch: MAIN
CVS Tags: ad-audiomp-base, ad-audiomp
Changes since 1.92: +3 -3 lines
Diff to previous 1.92 (colored)

Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.75.2.2 / (download) - annotate - [select for diffs], Sat Dec 30 20:50:55 2006 UTC (17 years, 2 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75.2.1: +4 -4 lines
Diff to previous 1.75.2.1 (colored)

sync with head.

Revision 1.84.4.1 / (download) - annotate - [select for diffs], Sat Sep 9 02:59:41 2006 UTC (17 years, 5 months ago) by rpaulo
Branch: rpaulo-netinet-merge-pcb
Changes since 1.84: +31 -18 lines
Diff to previous 1.84 (colored) next main 1.85 (colored)

sync with head

Revision 1.87.2.3 / (download) - annotate - [select for diffs], Sun Sep 3 15:25:56 2006 UTC (17 years, 6 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.87.2.2: +4 -4 lines
Diff to previous 1.87.2.2 (colored) to branchpoint 1.87 (colored) next main 1.88 (colored)

sync with head.

Revision 1.92 / (download) - annotate - [select for diffs], Mon Aug 28 01:46:10 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, yamt-splraiseipl-base2, yamt-splraiseipl-base, yamt-splraiseipl, yamt-pdpolicy-base9, yamt-pdpolicy-base8, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, rpaulo-netinet-merge-pcb-base, post-newlock2-merge, newlock2-nbase, newlock2-base, newlock2, 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
Branch point for: yamt-idlelwp
Changes since 1.91: +2 -2 lines
Diff to previous 1.91 (colored)

complete CFDRIVER initializer.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Aug 27 22:36:10 2006 UTC (17 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.90: +3 -3 lines
Diff to previous 1.90 (colored)

Fix incomplete initialization.

Revision 1.75.2.1 / (download) - annotate - [select for diffs], Wed Jun 21 15:12:02 2006 UTC (17 years, 8 months ago) by yamt
Branch: yamt-lazymbuf
Changes since 1.75: +98 -132 lines
Diff to previous 1.75 (colored)

sync with head.

Revision 1.84.6.2 / (download) - annotate - [select for diffs], Thu Jun 1 22:39:26 2006 UTC (17 years, 9 months ago) by kardel
Branch: simonb-timecounters
CVS Tags: simonb-timcounters-final
Changes since 1.84.6.1: +5 -8 lines
Diff to previous 1.84.6.1 (colored) next main 1.85 (colored)

Sync with head.

Revision 1.87.6.2 / (download) - annotate - [select for diffs], Wed May 24 15:50:47 2006 UTC (17 years, 9 months ago) by tron
Branch: peter-altq
Changes since 1.87.6.1: +5 -8 lines
Diff to previous 1.87.6.1 (colored) to branchpoint 1.87 (colored) next main 1.88 (colored)

Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.87.2.2 / (download) - annotate - [select for diffs], Wed May 24 10:59:21 2006 UTC (17 years, 9 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.87.2.1: +5 -8 lines
Diff to previous 1.87.2.1 (colored) to branchpoint 1.87 (colored)

sync with head.

Revision 1.87.4.2 / (download) - annotate - [select for diffs], Thu May 11 23:31:36 2006 UTC (17 years, 9 months ago) by elad
Branch: elad-kernelauth
Changes since 1.87.4.1: +5 -8 lines
Diff to previous 1.87.4.1 (colored) to branchpoint 1.87 (colored) next main 1.88 (colored)

sync with head

Revision 1.90 / (download) - annotate - [select for diffs], Fri May 5 18:04:43 2006 UTC (17 years, 10 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base7, yamt-pdpolicy-base6, yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base, gdamore-uart, elad-kernelauth-base, chap-midi-nbase, chap-midi-base, chap-midi, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.89: +5 -8 lines
Diff to previous 1.89 (colored)

Remove the devprop API and switch everthing over to the new proplib.  Add
a new device_properties() accessor for device_t that returns the device's
property dictionary.

Revision 1.84.6.1 / (download) - annotate - [select for diffs], Sat Apr 22 11:40:18 2006 UTC (17 years, 10 months ago) by simonb
Branch: simonb-timecounters
Changes since 1.84: +30 -14 lines
Diff to previous 1.84 (colored)

Sync with head.

Revision 1.87.4.1 / (download) - annotate - [select for diffs], Wed Apr 19 04:36:01 2006 UTC (17 years, 10 months ago) by elad
Branch: elad-kernelauth
Changes since 1.87: +3 -2 lines
Diff to previous 1.87 (colored)

sync with head.

Revision 1.87.2.1 / (download) - annotate - [select for diffs], Sat Apr 1 12:07:51 2006 UTC (17 years, 11 months ago) by yamt
Branch: yamt-pdpolicy
Changes since 1.87: +3 -2 lines
Diff to previous 1.87 (colored)

sync with head.

Revision 1.87.6.1 / (download) - annotate - [select for diffs], Fri Mar 31 09:45:29 2006 UTC (17 years, 11 months ago) by tron
Branch: peter-altq
Changes since 1.87: +3 -2 lines
Diff to previous 1.87 (colored)

Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.89 / (download) - annotate - [select for diffs], Wed Mar 29 06:08:16 2006 UTC (17 years, 11 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Changes since 1.88: +2 -1 lines
Diff to previous 1.88 (colored)

Add a device_private() to return the driver's private data (softc).
For now, this just returns the passed device_t (as a void *) because
device softcs currently contain a "struct device" as the first member.

Revision 1.88 / (download) - annotate - [select for diffs], Wed Mar 29 06:00:47 2006 UTC (17 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.87: +2 -2 lines
Diff to previous 1.87 (colored)

Replace device_locators() with device_locator(), and use it.

Revision 1.84.2.2 / (download) - annotate - [select for diffs], Wed Mar 1 09:28:51 2006 UTC (18 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.84.2.1: +26 -15 lines
Diff to previous 1.84.2.1 (colored) next main 1.85 (colored)

sync with head.

Revision 1.87 / (download) - annotate - [select for diffs], Thu Feb 23 05:48:12 2006 UTC (18 years ago) by thorpej
Branch: MAIN
CVS Tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base2, yamt-pdpolicy-base, peter-altq-base
Branch point for: yamt-pdpolicy, peter-altq, elad-kernelauth
Changes since 1.86: +3 -1 lines
Diff to previous 1.86 (colored)

Add device_is_a(), which returns true if the device is an instance
of the driver specified by name.

Revision 1.86 / (download) - annotate - [select for diffs], Sun Feb 19 15:01:21 2006 UTC (18 years ago) by thorpej
Branch: MAIN
Changes since 1.85: +24 -15 lines
Diff to previous 1.85 (colored)

Add accessor functions for the device_t type.  Make device_lookup() a
real function, rather than a macro.

Revision 1.84.2.1 / (download) - annotate - [select for diffs], Sat Feb 18 15:39:23 2006 UTC (18 years ago) by yamt
Branch: yamt-uio_vmspace
Changes since 1.84: +7 -3 lines
Diff to previous 1.84 (colored)

sync with head.

Revision 1.85 / (download) - annotate - [select for diffs], Sat Feb 18 05:04:13 2006 UTC (18 years ago) by thorpej
Branch: MAIN
Changes since 1.84: +7 -3 lines
Diff to previous 1.84 (colored)

- Don't expose dev_propdb directly -- provide devprop_*() wrappers instead.
- Rework the ARMADILLO / epe device properties interaction so that it actually
  associates the MAC address property with the epe device instance.

Revision 1.84 / (download) - annotate - [select for diffs], Sat Dec 24 19:01:28 2005 UTC (18 years, 2 months ago) by perry
Branch: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.83 / (download) - annotate - [select for diffs], Tue Dec 20 16:28:55 2005 UTC (18 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.82: +2 -61 lines
Diff to previous 1.82 (colored)

Move evcnt definitions into <sys/evcnt.h>.  Include this from <sys/device.h>
for compatibility.

Revision 1.82 / (download) - annotate - [select for diffs], Tue Dec 20 04:30:28 2005 UTC (18 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.81: +51 -54 lines
Diff to previous 1.81 (colored)

Provide typedefs:
- devclass_t
- devact_t
- cfdata_t
- device_t

...and use them.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Dec 11 12:25:20 2005 UTC (18 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.80: +1 -1 lines
Diff to previous 1.80 (colored)

merge ktrace-lwp.

Revision 1.64.6.9 / (download) - annotate - [select for diffs], Thu Nov 10 14:12:12 2005 UTC (18 years, 3 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.8: +36 -28 lines
Diff to previous 1.64.6.8 (colored) to branchpoint 1.64 (colored) next main 1.65 (colored)

Sync with HEAD. Here we go again...

Revision 1.80 / (download) - annotate - [select for diffs], Sat Sep 10 10:39:39 2005 UTC (18 years, 5 months ago) by itohy
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, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Changes since 1.79: +6 -2 lines
Diff to previous 1.79 (colored)

Make it compile for gcc 2.95.

Revision 1.79 / (download) - annotate - [select for diffs], Fri Aug 26 14:20:40 2005 UTC (18 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.78: +5 -9 lines
Diff to previous 1.78 (colored)

nuke locdesc_t from orbit

Revision 1.78 / (download) - annotate - [select for diffs], Thu Aug 25 22:17:19 2005 UTC (18 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.77: +2 -1 lines
Diff to previous 1.77 (colored)

now that we have information about default locator values
we can implement an universal submatch() function covering all
the standard cases:
if (<configured> != <wildcard> && <configured> != <real>)
	then fail
else
	ask device match function

Revision 1.77 / (download) - annotate - [select for diffs], Thu Aug 25 18:35:40 2005 UTC (18 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.76: +4 -9 lines
Diff to previous 1.76 (colored)

replace the "locdesc_t" structure carrying the number of locators
explicitely by a plain integer array
the length in now known to all relevant parties, so this avoids
duplication of information, and we can allocate that thing in
drivers without hacks

Revision 1.76 / (download) - annotate - [select for diffs], Thu Aug 25 15:06:28 2005 UTC (18 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.75: +23 -4 lines
Diff to previous 1.75 (colored)

Replace the "locnames", attached to cfdata, which was solely good for
userconf, by more complete information (including default values) about
interface attributes, attached to the drivers which provide them.

Revision 1.75 / (download) - annotate - [select for diffs], Tue Jun 28 18:37:34 2005 UTC (18 years, 8 months ago) by drochner
Branch: MAIN
Branch point for: yamt-lazymbuf
Changes since 1.74: +7 -11 lines
Diff to previous 1.74 (colored)

clean up duplication which was to support the old (not locator passing)
API for bus "submatch" functions

Revision 1.74 / (download) - annotate - [select for diffs], Sun Jun 19 23:09:50 2005 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.73: +1 -4 lines
Diff to previous 1.73 (colored)

remove duplicate declaration.

Revision 1.72.4.1 / (download) - annotate - [select for diffs], Fri Apr 29 11:29:37 2005 UTC (18 years, 10 months ago) by kent
Branch: kent-audio2
Changes since 1.72: +4 -4 lines
Diff to previous 1.72 (colored) next main 1.73 (colored)

sync with -current

Revision 1.72.6.1 / (download) - annotate - [select for diffs], Sat Mar 19 08:36:52 2005 UTC (18 years, 11 months ago) by yamt
Branch: yamt-km
Changes since 1.72: +4 -4 lines
Diff to previous 1.72 (colored) next main 1.73 (colored)

sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.64.6.8 / (download) - annotate - [select for diffs], Fri Mar 4 16:54:22 2005 UTC (19 years ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.7: +4 -4 lines
Diff to previous 1.64.6.7 (colored) to branchpoint 1.64 (colored)

Sync with HEAD.

Hi Perry!

Revision 1.73 / (download) - annotate - [select for diffs], Sat Feb 26 22:25:34 2005 UTC (19 years ago) by perry
Branch: MAIN
CVS Tags: yamt-km-base4, yamt-km-base3, 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, kent-audio2-base
Changes since 1.72: +4 -4 lines
Diff to previous 1.72 (colored)

nuke trailing whitespace

Revision 1.64.6.7 / (download) - annotate - [select for diffs], Tue Nov 2 07:53:37 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.6: +3 -1 lines
Diff to previous 1.64.6.6 (colored) to branchpoint 1.64 (colored)

Sync with HEAD.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Oct 23 17:14:12 2004 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
CVS Tags: yamt-km-base2, yamt-km-base, kent-audio1-beforemerge, kent-audio1-base, kent-audio1
Branch point for: yamt-km, kent-audio2
Changes since 1.71: +3 -1 lines
Diff to previous 1.71 (colored)

- Centralize the declaration of booted_device and booted_partition.
- Add a booted_wedge variable that indicates the wedge that was booted
  from.  If this is NULL, booted_partition is consulted.
- Adjust setroot() and its support routines for root-on-wedges.  Could
  use some tidy-up, but this works for now.

Revision 1.64.6.6 / (download) - annotate - [select for diffs], Tue Oct 19 15:58:30 2004 UTC (19 years, 4 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.5: +2 -2 lines
Diff to previous 1.64.6.5 (colored) to branchpoint 1.64 (colored)

Sync with HEAD

Revision 1.71 / (download) - annotate - [select for diffs], Fri Oct 15 04:38:36 2004 UTC (19 years, 4 months ago) by thorpej
Branch: MAIN
Changes since 1.70: +2 -2 lines
Diff to previous 1.70 (colored)

Change config_attach_pseudo() to take a cfdata * that contains the
necessary information to create the pseudo-device instance.  Pseudo-device
device's will reference this cfdata, just as normal devices reference
their corresponding cfdata.

Welcome to 2.99.10.

Revision 1.64.6.5 / (download) - annotate - [select for diffs], Tue Sep 21 13:38:45 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.4: +1 -1 lines
Diff to previous 1.64.6.4 (colored) to branchpoint 1.64 (colored)

Fix the sync with head I botched.

Revision 1.64.6.4 / (download) - annotate - [select for diffs], Sat Sep 18 14:56:30 2004 UTC (19 years, 5 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.3: +1 -1 lines
Diff to previous 1.64.6.3 (colored) to branchpoint 1.64 (colored)

Sync with HEAD.

Revision 1.64.6.3 / (download) - annotate - [select for diffs], Fri Sep 3 12:45:55 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.2: +10 -3 lines
Diff to previous 1.64.6.2 (colored) to branchpoint 1.64 (colored)

Sync with HEAD

Revision 1.70 / (download) - annotate - [select for diffs], Mon Aug 30 09:53:32 2004 UTC (19 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.69: +10 -3 lines
Diff to previous 1.69 (colored)

-change the config_found() macro to use config_sound_sm_loc()
 internally (shouldn't make a difference for callers)
-add convenience macros for config_found() and config_search() to
 ease the case where just an interface attribute is specified

Revision 1.64.6.2 / (download) - annotate - [select for diffs], Wed Aug 25 06:59:14 2004 UTC (19 years, 6 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64.6.1: +45 -4 lines
Diff to previous 1.64.6.1 (colored) to branchpoint 1.64 (colored)

Sync with HEAD.

Revision 1.69 / (download) - annotate - [select for diffs], Tue Aug 17 22:13:18 2004 UTC (19 years, 6 months ago) by drochner
Branch: MAIN
Changes since 1.68: +45 -4 lines
Diff to previous 1.68 (colored)

Add some extensions to the autoconf framework to better support
loadable drivers and user controlled attach/detach of devices.
An outline was given in
http://mail-index.NetBSD.org/tech-kern/2004/08/11/0000.html
To cite the relevant parts:
-Add a "child detached" and a "rescan" method (both optional)
 to the device driver. (This is added to the "cfattach" for now
 because this is under the driver writer's control. Logically
 it belongs more to the "cfdriver", but this is automatically
 generated now.)
 The "child detached" is called by the autoconf framework
 during config_detach(), after the child's ca_detach()
 function was called but before the device data structure
 is freed.
 The "rescan" is called explicitely, either after a driver LKM
 was loaded, or on user request (see the "control device" below).
-Add a field to the device instance where the "locators" (in
 terms of the autoconf framework), which describe the actual
 location of the device relatively to the parent bus, can be
 stored. This can be used by the "child detached" function
 for easier bookkeeping (no need to lookup by device instance
 pointer). (An idea for the future is to use this for generation
 of optimized kernel config files - like DEC's "doconfig".)
-Pass the locators tuple describing a device's location to
 various autoconf functions to support the previous. And since
 locators do only make sense in relation to an "interface
 attribute", pass this as well.
-Add helper functions to add/remove supplemental "cfdata"
 arrays. Needed for driver LKMs.

There is some code duplication which will hopefully resolved
when all "submatch"-style functions are changed to accept the
locator argument.
Some more cleanup can take place when config(8) issues more
information about locators, in particular the length and default
values. To be done later.

Revision 1.64.6.1 / (download) - annotate - [select for diffs], Tue Aug 3 10:56:26 2004 UTC (19 years, 7 months ago) by skrll
Branch: ktrace-lwp
Changes since 1.64: +8 -8 lines
Diff to previous 1.64 (colored)

Sync with HEAD

Revision 1.68 / (download) - annotate - [select for diffs], Fri Apr 30 23:00:03 2004 UTC (19 years, 10 months ago) by matt
Branch: MAIN
Changes since 1.67: +3 -2 lines
Diff to previous 1.67 (colored)

Add EVCNT_ATTACH_STATIC2 to allow adding of array members

Revision 1.67 / (download) - annotate - [select for diffs], Mon Nov 17 10:07:58 2003 UTC (20 years, 3 months ago) by keihan
Branch: MAIN
CVS Tags: 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
Changes since 1.66: +2 -2 lines
Diff to previous 1.66 (colored)

www.netbsd.org -> www.NetBSD.org

Revision 1.66 / (download) - annotate - [select for diffs], Thu Aug 7 16:34:00 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.65: +2 -6 lines
Diff to previous 1.65 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.

Revision 1.65 / (download) - annotate - [select for diffs], Fri Jul 4 00:24:29 2003 UTC (20 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.64: +4 -1 lines
Diff to previous 1.64 (colored)

Add a dev_propdb to hold device properties.  Properties are already being
used in an ad hoc way by a couple of eval board ports, so might as well
tidy it up a little and add some formality.  (And, yes, I need to use it
in another eval board port.)

Revision 1.45.2.7 / (download) - annotate - [select for diffs], Wed Dec 11 06:50:04 2002 UTC (21 years, 2 months ago) by thorpej
Branch: nathanw_sa
CVS Tags: nathanw_sa_end
Changes since 1.45.2.6: +8 -0 lines
Diff to previous 1.45.2.6 (colored) to branchpoint 1.45 (colored) next main 1.46 (colored)

Sync with HEAD.

Revision 1.64 / (download) - annotate - [select for diffs], Sun Nov 24 17:33:43 2002 UTC (21 years, 3 months ago) by thorpej
Branch: MAIN
CVS Tags: nathanw_sa_before_merge, nathanw_sa_base, gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw, fvdl_fs64_base
Branch point for: ktrace-lwp
Changes since 1.63: +9 -1 lines
Diff to previous 1.63 (colored)

Add an EVCNT_ATTACH_STATIC() macro which gathers static evcnts
into a link set, which are added to the list of event counters
at boot time.

Revision 1.45.2.6 / (download) - annotate - [select for diffs], Mon Nov 11 22:16:21 2002 UTC (21 years, 3 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.5: +4 -3 lines
Diff to previous 1.45.2.5 (colored) to branchpoint 1.45 (colored)

Catch up to -current

Revision 1.63 / (download) - annotate - [select for diffs], Wed Oct 23 01:06:54 2002 UTC (21 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: kqueue-beforemerge, kqueue-aftermerge
Changes since 1.62: +4 -4 lines
Diff to previous 1.62 (colored)

s/{ }/{ 0 }/g

Revision 1.62 / (download) - annotate - [select for diffs], Sun Oct 20 02:27:01 2002 UTC (21 years, 4 months ago) by isaki
Branch: MAIN
Changes since 1.61: +2 -1 lines
Diff to previous 1.61 (colored)

x68k needs config_cfdriver_lookup() to initialize its console.
XXX ad-hoc way?

Revision 1.45.2.5 / (download) - annotate - [select for diffs], Fri Oct 18 02:45:39 2002 UTC (21 years, 4 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.4: +84 -9 lines
Diff to previous 1.45.2.4 (colored) to branchpoint 1.45 (colored)

Catch up to -current.

Revision 1.46.2.4 / (download) - annotate - [select for diffs], Thu Oct 10 18:44:43 2002 UTC (21 years, 4 months ago) by jdolecek
Branch: kqueue
Changes since 1.46.2.3: +55 -7 lines
Diff to previous 1.46.2.3 (colored) next main 1.47 (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.61 / (download) - annotate - [select for diffs], Wed Oct 9 02:59:57 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.60: +10 -3 lines
Diff to previous 1.60 (colored)

Implement config_attach_pseudo(), which creates an instance of
a pseudo-device which behaves like a normal device in the device
tree, including the capability to have children.

Revision 1.60 / (download) - annotate - [select for diffs], Fri Oct 4 01:50:54 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.59: +25 -5 lines
Diff to previous 1.59 (colored)

Overhaul the way cfattach structures are looked up.  The cfdata entry
now carries the name of the attachment (e.g. "tlp_pci" or "audio"),
and cfattach structures are registered at boot time on a per-driver
basis.  The cfdriver and cfattach pointers are cached in the device
structure when attached.

Revision 1.59 / (download) - annotate - [select for diffs], Wed Oct 2 16:49:31 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: kqueue-base
Changes since 1.58: +3 -3 lines
Diff to previous 1.58 (colored)

Assume caller will add trailing ; to CFDRIVER_DECL and CFATTACH_DECL.

Revision 1.58 / (download) - annotate - [select for diffs], Tue Oct 1 18:11:58 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.57: +4 -1 lines
Diff to previous 1.57 (colored)

Add a generic config finalization hook, to be called once all real
devices have been discovered.  All finalizer routines are iteratively
invoked until all of them report that they have done no work.

Use this hook to fix a latent bug in RAIDframe autoconfiguration of
RAID sets exposed by the rework of SCSI device discovery.

Revision 1.57 / (download) - annotate - [select for diffs], Mon Sep 30 20:42:29 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

Fix thinko in CFATTACH_DECL().

Revision 1.56 / (download) - annotate - [select for diffs], Mon Sep 30 18:46:44 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.55: +11 -1 lines
Diff to previous 1.55 (colored)

Add macros to declare cfdriver and cfattach structures.  This will allow
us to shield things that declare these structures from changes to the
structure (to a certain extent, anyway).

Revision 1.55 / (download) - annotate - [select for diffs], Mon Sep 30 17:36:31 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored)

Add a config_init() function to initialize the config data structures.
Normally this is called by configure(), but some ports (amiga, atari,
x68k) need to do this early because of how they find the console.

Revision 1.54 / (download) - annotate - [select for diffs], Fri Sep 27 20:42:13 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

Declare all cfattach structures const.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Sep 27 03:18:23 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.52: +3 -1 lines
Diff to previous 1.52 (colored)

Introduce a new routine, config_match(), which invokes the
cfattach->ca_match function in behalf of the caller.  Use it
rather than invoking cfattach->ca_match directly.

Revision 1.52 / (download) - annotate - [select for diffs], Fri Sep 27 02:24:34 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.51: +9 -2 lines
Diff to previous 1.51 (colored)

Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver.  The cfdriver is then looked
up in a list which is built at run-time.

Revision 1.51 / (download) - annotate - [select for diffs], Thu Sep 26 04:07:36 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.50: +17 -3 lines
Diff to previous 1.50 (colored)

Overhaul the way parent attachments are specified; instead of using
a vector of indices into the cfdata table to specify potential parents,
record the interface attributes that devices have and add a new "parent
spec" structure which lists the iattr, as well as optionally listing
specific parent device instances.

See:

    http://mail-index.netbsd.org/tech-kern/2002/09/25/0014.html

...for a detailed description.

While here, const poison some things, as suggested by Matt Thomas.

Revision 1.50 / (download) - annotate - [select for diffs], Mon Sep 23 23:16:07 2002 UTC (21 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.49: +13 -2 lines
Diff to previous 1.49 (colored)

Add support for multiple cfdata tables to the internals of the
autoconfiguration machinery, derived from PR #2112.

More work is left to do, including revamping how matches against
a candidate parent are done.

Revision 1.49.6.2 / (download) - annotate - [select for diffs], Sat Apr 6 16:04:31 2002 UTC (21 years, 11 months ago) by eeh
Branch: eeh-devprop
Changes since 1.49.6.1: +8 -3 lines
Diff to previous 1.49.6.1 (colored) to branchpoint 1.49 (colored) next main 1.50 (colored)

Add dev_dumprops() for debug and make dev_mdgetprop() conditional.

Revision 1.49.6.1 / (download) - annotate - [select for diffs], Fri Mar 22 18:24:34 2002 UTC (21 years, 11 months ago) by eeh
Branch: eeh-devprop
Changes since 1.49: +59 -7 lines
Diff to previous 1.49 (colored)

Add devprops interfaces.

Revision 1.46.2.3 / (download) - annotate - [select for diffs], Sat Mar 16 16:02:22 2002 UTC (21 years, 11 months ago) by jdolecek
Branch: kqueue
Changes since 1.46.2.2: +4 -1 lines
Diff to previous 1.46.2.2 (colored)

Catch up with -current.

Revision 1.45.2.4 / (download) - annotate - [select for diffs], Thu Feb 28 04:15:23 2002 UTC (22 years ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.3: +4 -1 lines
Diff to previous 1.45.2.3 (colored) to branchpoint 1.45 (colored)

Catch up to -current.

Revision 1.49 / (download) - annotate - [select for diffs], Fri Feb 15 11:18:26 2002 UTC (22 years ago) by simonb
Branch: MAIN
CVS Tags: newlock-base, newlock, netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001, netbsd-1-6, ifpoll-base, gehenna-devsw-base, gehenna-devsw, eeh-devprop-base
Branch point for: eeh-devprop
Changes since 1.48: +4 -1 lines
Diff to previous 1.48 (colored)

Add a "show event" ddb command to show the event counters.

Revision 1.46.2.2 / (download) - annotate - [select for diffs], Thu Jan 10 20:04:39 2002 UTC (22 years, 1 month ago) by thorpej
Branch: kqueue
Changes since 1.46.2.1: +2 -1 lines
Diff to previous 1.46.2.1 (colored)

Sync kqueue branch with -current.

Revision 1.45.2.3 / (download) - annotate - [select for diffs], Tue Jan 8 00:34:40 2002 UTC (22 years, 2 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.2: +2 -1 lines
Diff to previous 1.45.2.2 (colored) to branchpoint 1.45 (colored)

Catch up to -current.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Dec 2 02:42:25 2001 UTC (22 years, 3 months ago) by augustss
Branch: MAIN
Changes since 1.47: +2 -1 lines
Diff to previous 1.47 (colored)

Prototype for config_makeroom(), the routine that expands the cd_devs array.

Revision 1.42.2.1 / (download) - annotate - [select for diffs], Thu Oct 25 17:54:36 2001 UTC (22 years, 4 months ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.42: +6 -1 lines
Diff to previous 1.42 (colored) next main 1.43 (colored)

Pull up revision 1.43 (requested by ad):
  Add Mylex DACC960, CAC-EISA, and I2O block/SCSI drivers.

Revision 1.45.2.2 / (download) - annotate - [select for diffs], Fri Sep 21 22:37:00 2001 UTC (22 years, 5 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45.2.1: +2 -1 lines
Diff to previous 1.45.2.1 (colored) to branchpoint 1.45 (colored)

Catch up to -current.

Revision 1.46.2.1 / (download) - annotate - [select for diffs], Thu Sep 13 01:16:27 2001 UTC (22 years, 5 months ago) by thorpej
Branch: kqueue
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

Update the kqueue branch to HEAD.

Revision 1.47 / (download) - annotate - [select for diffs], Sun Aug 26 02:48:12 2001 UTC (22 years, 6 months ago) by matt
Branch: MAIN
CVS Tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3, thorpej-devvp-base2, thorpej-devvp-base, thorpej-devvp, pre-chs-ubcperf, post-chs-ubcperf
Changes since 1.46: +2 -1 lines
Diff to previous 1.46 (colored)

Add EVCNT_TRAP event counter type.

Revision 1.45.2.1 / (download) - annotate - [select for diffs], Fri Aug 24 00:13:02 2001 UTC (22 years, 6 months ago) by nathanw
Branch: nathanw_sa
Changes since 1.45: +6 -4 lines
Diff to previous 1.45 (colored)

Catch up with -current.

Revision 1.46 / (download) - annotate - [select for diffs], Sun Jul 1 02:56:20 2001 UTC (22 years, 8 months ago) by gmcgarry
Branch: MAIN
Branch point for: kqueue
Changes since 1.45: +6 -4 lines
Diff to previous 1.45 (colored)

In-kernel device configuration manager - allows modification
of device locators at run-time.

Written by Mats O Jansson <moj@stacken.kth.se>.  Reworked by
Jun-ichiro itojun Hagino <itojun@netbsd.org>.

Revision 1.35.2.2 / (download) - annotate - [select for diffs], Fri Dec 8 09:19:42 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35.2.1: +2 -2 lines
Diff to previous 1.35.2.1 (colored) to branchpoint 1.35 (colored) next main 1.36 (colored)

Sync with HEAD.

Revision 1.45 / (download) - annotate - [select for diffs], Fri Dec 1 02:07:04 2000 UTC (23 years, 3 months ago) by simonb
Branch: MAIN
CVS Tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Changes since 1.44: +2 -2 lines
Diff to previous 1.44 (colored)

Remove trailing , from last enum element.

Revision 1.35.2.1 / (download) - annotate - [select for diffs], Mon Nov 20 18:11:27 2000 UTC (23 years, 3 months ago) by bouyer
Branch: thorpej_scsipi
Changes since 1.35: +108 -30 lines
Diff to previous 1.35 (colored)

Update thorpej_scsipi to -current as of a month ago

Revision 1.44 / (download) - annotate - [select for diffs], Sat Jul 22 05:02:24 2000 UTC (23 years, 7 months ago) by matt
Branch: MAIN
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Make gcc-2.96 shutup about trigraph ignored.

Revision 1.43 / (download) - annotate - [select for diffs], Thu Jul 6 00:42:35 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.42: +6 -1 lines
Diff to previous 1.42 (colored)

Add a device_lookup() macro which encapsulates a small snippet of code
that tons and tons of files all over the tree duplicate, many in slightly
different ways.

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 17:10:22 2000 UTC (23 years, 8 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.37: +99 -29 lines
Diff to previous 1.37 (colored) next main 1.38 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.42 / (download) - annotate - [select for diffs], Tue Jun 13 22:36:16 2000 UTC (23 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.41: +9 -6 lines
Diff to previous 1.41 (colored)

Replace my personal attribution string ("This product includes software
developed by Christopher G. Demetriou for the NetBSD Project.") with
a generic NetBSD one ("This product includes software developed for the
NetBSD Project.  See http://www.netbsd.org/ for information about NetBSD.")
so that this same set of terms can be used by others if they so desire.
(Eventually i'll be converting more/all of my code.)

Revision 1.41 / (download) - annotate - [select for diffs], Sun Jun 4 19:15:20 2000 UTC (23 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.40: +74 -7 lines
Diff to previous 1.40 (colored)

Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).

Revision 1.40 / (download) - annotate - [select for diffs], Fri Jun 2 01:48:52 2000 UTC (23 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.39: +4 -4 lines
Diff to previous 1.39 (colored)

another mod of opportunity: const poison.  (cfprint_t should take
const char * as second arg, too, but that's Hard.)  also, convert use
of "(char *)0" to NULL.

Revision 1.39 / (download) - annotate - [select for diffs], Fri Jun 2 01:31:52 2000 UTC (23 years, 9 months ago) by cgd
Branch: MAIN
Changes since 1.38: +24 -25 lines
Diff to previous 1.38 (colored)

__P and K&R declarations -> ANSI protos + declarations.  tweak NetBSD IDs,
and __KERNEL_RCSID to subr_autoconf.c.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Jun 1 00:03:10 2000 UTC (23 years, 9 months ago) by matt
Branch: MAIN
Changes since 1.37: +2 -1 lines
Diff to previous 1.37 (colored)

Add extern struct device *booted_device (make MI instead of MD since nearly
every port uses it).

Revision 1.37 / (download) - annotate - [select for diffs], Mon Mar 6 02:48:51 2000 UTC (24 years ago) by mhitch
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.36: +2 -3 lines
Diff to previous 1.36 (colored)

Also use __HAVE_DEVICE_REGISTER for the device_register() prototype, rather
than a list of architecture defines.

Revision 1.36 / (download) - annotate - [select for diffs], Mon Jan 24 18:03:20 2000 UTC (24 years, 1 month ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc2-newbase
Changes since 1.35: +5 -1 lines
Diff to previous 1.35 (colored)

Add a `config_pending' semaphore to block mounting of the root file system
until all device driver discovery threads have had a chance to do their
work.  This in turn blocks initproc's exec of init(8) until root is
mounted and process start times and CWD info has been fixed up.

Addresses kern/9247.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Sep 23 15:14:58 1999 UTC (24 years, 5 months ago) by minoura
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, fvdl-softdep-base, fvdl-softdep, comdex-fall-1999-base, comdex-fall-1999
Branch point for: thorpej_scsipi
Changes since 1.34: +2 -2 lines
Diff to previous 1.34 (colored)

First step toward network boot.
By Takeshi Nakayama <tn@catvmics.ne.jp>.

Revision 1.34 / (download) - annotate - [select for diffs], Wed Sep 15 19:37:08 1999 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.33: +2 -1 lines
Diff to previous 1.33 (colored)

Add a mechanism to defer configuration of children until interrupts
are enabled.

Revision 1.33 / (download) - annotate - [select for diffs], Wed Sep 15 18:10:33 1999 UTC (24 years, 5 months ago) by thorpej
Branch: MAIN
Changes since 1.32: +2 -3 lines
Diff to previous 1.32 (colored)

Rename the machine-dependent autoconfiguration entry point `cpu_configure()',
and rename config_init() to configure() and call cpu_configure() from there.

Revision 1.31.6.1 / (download) - annotate - [select for diffs], Mon Jun 21 01:30:16 1999 UTC (24 years, 8 months ago) by thorpej
Branch: chs-ubc2
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored) next main 1.32 (colored)

Sync w/ -current.

Revision 1.32 / (download) - annotate - [select for diffs], Sun Jun 20 00:51:37 1999 UTC (24 years, 8 months ago) by ragge
Branch: MAIN
CVS Tags: chs-ubc2-base
Changes since 1.31: +3 -2 lines
Diff to previous 1.31 (colored)

Add vax to user of device_register.

Revision 1.31 / (download) - annotate - [select for diffs], Thu Dec 3 23:50:11 1998 UTC (25 years, 3 months ago) by pk
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4, kenh-if-detach-base, kenh-if-detach, kame_14_19990705, kame_14_19990628, kame_141_19991130, kame
Branch point for: chs-ubc2
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

Enable `device_register()' for the sparc.

Revision 1.30 / (download) - annotate - [select for diffs], Tue Nov 17 08:38:07 1998 UTC (25 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.29: +24 -2 lines
Diff to previous 1.29 (colored)

Implement config_detach(), mostly from Chris Demetriou, modified slightly
by Ken Hornstein and myself.

Add flags to struct device, and define one as "active".  Devices are
initially active from config_attach().  Their active state may be changed
via config_activate() and config_deactivate().

These new functions assume that the device being manipulated will recursively
perform the action on its children.

Together, config_deactivate() and config_detach() may be used to implement
interrupt-driven device detachment.  config_deactivate() will take care of
things that need to be performed at interrupt time, and config_detach()
(which must run in a valid thread context) finishes the job, which may
block.

Revision 1.29 / (download) - annotate - [select for diffs], Tue Oct 6 20:44:40 1998 UTC (25 years, 5 months ago) by thorpej
Branch: MAIN
CVS Tags: chs-ubc-base, chs-ubc
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Prototype configure() here, and make it a machine-dependent call that
MI code expects to exist.

Revision 1.28 / (download) - annotate - [select for diffs], Sun Sep 13 14:46:23 1998 UTC (25 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.27: +2 -2 lines
Diff to previous 1.27 (colored)

Fix copyright typos...

Revision 1.27 / (download) - annotate - [select for diffs], Mon Aug 31 23:05:52 1998 UTC (25 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.26: +1 -3 lines
Diff to previous 1.26 (colored)

the cfdriver's cd_lossage_prevention field is no longer necessary, since
config automatically generates cfdriver structs (for better or worse).

Revision 1.26 / (download) - annotate - [select for diffs], Mon Aug 31 22:28:08 1998 UTC (25 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.25: +1 -20 lines
Diff to previous 1.25 (colored)

kill the last remnants of __BROKEN_INDIRECT_CONFIG.  (only the pica port
used it, and it's non-working and apparently slated for replacement.)

Revision 1.25 / (download) - annotate - [select for diffs], Tue Jun 9 18:46:12 1998 UTC (25 years, 9 months ago) by thorpej
Branch: MAIN
CVS Tags: eeh-paddr_t-base, eeh-paddr_t
Changes since 1.24: +2 -1 lines
Diff to previous 1.24 (colored)

Implement config_defer(), a generic mechanism to defer the configuration
of a device until all of its parent's children have been attached.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Sun Mar 1 02:11:01 1998 UTC (26 years ago) by fvdl
Branch: netbsd, CSRG
CVS Tags: lite-2, lite-1, date-03-may-96
Changes since 1.1: +33 -5 lines
Diff to previous 1.1 (colored)

Import 4.4BSD-Lite for reference

Revision 1.24 / (download) - annotate - [select for diffs], Mon Jan 12 21:21:45 1998 UTC (26 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.23: +0 -4 lines
Diff to previous 1.23 (colored)

Revert last change.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jan 12 08:04:55 1998 UTC (26 years, 1 month ago) by thorpej
Branch: MAIN
Changes since 1.22: +5 -1 lines
Diff to previous 1.22 (colored)

Pull in ioconf.h if _KERNEL and ! _LKM.

Revision 1.21.4.1 / (download) - annotate - [select for diffs], Mon Sep 22 06:34:18 1997 UTC (26 years, 5 months ago) by thorpej
Branch: marc-pcmcia
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored) next main 1.22 (colored)

Update marc-pcmcia branch from trunk.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Sep 20 14:08:27 1997 UTC (26 years, 5 months ago) by drochner
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3, marc-pcmcia-base
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

enable "device_register()" for the i386 too

Revision 1.21 / (download) - annotate - [select for diffs], Fri Mar 14 22:52:20 1997 UTC (26 years, 11 months ago) by jtk
Branch: MAIN
CVS Tags: thorpej-signal-base, thorpej-signal, marc-pcmcia-bp, bouyer-scsipi
Branch point for: marc-pcmcia
Changes since 1.20: +2 -1 lines
Diff to previous 1.20 (colored)

add cf_locnames to struct cfdata

Revision 1.20 / (download) - annotate - [select for diffs], Tue Dec 17 08:56:18 1996 UTC (27 years, 2 months ago) by thorpej
Branch: MAIN
CVS Tags: thorpej-setroot, mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Prototype device_register() if __alpha__ || hp300

Revision 1.19 / (download) - annotate - [select for diffs], Thu Dec 5 00:08:11 1996 UTC (27 years, 3 months ago) by cgd
Branch: MAIN
Changes since 1.18: +20 -1 lines
Diff to previous 1.18 (colored)

First steps in removing config_scan() and the hacks that gave devices
on indirect-config busses a (permanent) softc that they could share
between 'match' and 'attach' routines:

Check for a new definition, __BROKEN_INDIRECT_CONFIG, and if it is _not_
defined:
        define match functions to take a struct cfdata * as their second
	argument, config_search() to take a struct cfdata * as its second
	argument, and config_{root,}search() to return struct cfdata *.

        remove 'cd_indirect' cfdriver element.

        remove config_scan().

Ports will define __BROKEN_INDIRECT_CONFIG until their drivers prototypes
are updated to work with the new definitions, and until it is sure that
their indirect-config drivers do not assume that they have a softc
in their match routine.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Nov 11 14:20:34 1996 UTC (27 years, 3 months ago) by mycroft
Branch: MAIN
Changes since 1.17: +1 -3 lines
Diff to previous 1.17 (colored)

Remove remaining vector cruft.

Revision 1.17 / (download) - annotate - [select for diffs], Tue Aug 27 22:00:12 1996 UTC (27 years, 6 months ago) by cgd
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

change cfprint_t type definition to take a const char *, rather than
a char *, because that's what was really intended, and because
if the print function modifies the string, various things could become
unhappy (so the string should _not_ be modified).

Revision 1.16 / (download) - annotate - [select for diffs], Wed Jul 10 17:52:04 1996 UTC (27 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.15: +4 -1 lines
Diff to previous 1.15 (colored)

#ifdef __alpha__, prototype device_register

Revision 1.15 / (download) - annotate - [select for diffs], Tue Apr 9 20:55:24 1996 UTC (27 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

fix extra spaces at ends of lines, etc.  (all spacing nits.)

Revision 1.14 / (download) - annotate - [select for diffs], Thu Apr 4 06:06:20 1996 UTC (27 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.13: +5 -4 lines
Diff to previous 1.13 (colored)

Make config_found_sm() (and therefore config_found()) and config_rootfound()
return a struct device * of attached device, or NULL if device attach failed,
rather than 1/0 for success/failure, so that code that bus code which needs
to know what the child device is doesn't have to open-code a hacked variant
of config_found().  Make config_attach() return struct device *, rather than
void, to facilitate that.

Revision 1.13 / (download) - annotate - [select for diffs], Thu Apr 4 00:25:44 1996 UTC (27 years, 11 months ago) by cgd
Branch: MAIN
Changes since 1.12: +11 -5 lines
Diff to previous 1.12 (colored)

change 'struct device' and 'struct evcnt' lists (alldevs and allevents) to
be TAILQ's.  TAILQ_HEAD's of those structs are now 'struct devicelist' and
'struct evcntlist', respectively.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Mar 17 01:03:02 1996 UTC (27 years, 11 months ago) by thorpej
Branch: MAIN
Changes since 1.11: +22 -10 lines
Diff to previous 1.11 (colored)

New device attachment scheme:

	- split softc size and match/attach out from cfdriver into
	  a new struct cfattach.

	- new "attach" directive for files.*.  May specify the name of
	  the cfattach structure, so that devices may be easily attached
	  to parents with different autoconfiguration semantics.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Mar 5 22:14:58 1996 UTC (28 years ago) by thorpej
Branch: MAIN
Changes since 1.10: +3 -1 lines
Diff to previous 1.10 (colored)

Protect function prototypes and declaration of global variables
with #ifdef _KERNEL

Revision 1.10 / (download) - annotate - [select for diffs], Tue Feb 27 21:45:51 1996 UTC (28 years ago) by cgd
Branch: MAIN
Changes since 1.9: +5 -2 lines
Diff to previous 1.9 (colored)

Replace config_found() with config_found_sm(), which adds a cfmatch_t to the
argument list.  This allows easy 'submatching', which will eliminate a fair
bit of slightly tricky duplicated code from various busses.  config_found()
is now a #define in sys/device.h, which invokes config_found_sm().

Revision 1.9 / (download) - annotate - [select for diffs], Fri Feb 9 18:25:04 1996 UTC (28 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.8: +3 -2 lines
Diff to previous 1.8 (colored)

Filesystem prototype changes

Revision 1.8 / (download) - annotate - [select for diffs], Fri Nov 4 06:40:17 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.7: +3 -13 lines
Diff to previous 1.7 (colored)

Add a new function config_scan(), which just calls a particular function
with each plausibly cfdata, ignoring the priority mechanism completely.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Nov 4 03:12:23 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +13 -1 lines
Diff to previous 1.6 (colored)

Export struct matchinfo and mapply().

Revision 1.6 / (download) - annotate - [select for diffs], Thu Nov 3 21:51:43 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +6 -10 lines
Diff to previous 1.5 (colored)

Change second arg of match routines and config_attach() to void*; have
config_search() and config_rootsearch() return void*.  Remove old cd_aux
(which was unused), and add cd_indirect where it used to be.

Revision 1.5 / (download) - annotate - [select for diffs], Thu Nov 3 20:27:02 1994 UTC (29 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +5 -1 lines
Diff to previous 1.4 (colored)

If CONFIG_INDIRECT, the second arg to the match routine is a softc, not a cfdata.

Revision 1.4 / (download) - annotate - [select for diffs], Wed Jun 29 06:43:49 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

New RCS ID's, take two.  they're more aesthecially pleasant, and use 'NetBSD'

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jun 27 19:30:52 1994 UTC (29 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored)

new standard, minimally intrusive ID format

Revision 1.2 / (download) - annotate - [select for diffs], Fri May 20 04:26:12 1994 UTC (29 years, 9 months ago) by glass
Branch: MAIN
Changes since 1.1: +35 -5 lines
Diff to previous 1.1 (colored)

update to 4.4-lite, except for some prototypes in disk.h that would've caused trouble

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Mon Nov 29 06:09:18 1993 UTC (30 years, 3 months ago) by mycroft
Branch: magnum
Changes since 1.1: +3 -1 lines
Diff to previous 1.1 (colored) next main 1.2 (colored)

Add a prototype of dk_establish(), with a forward declaration of dkdevice.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Aug 13 13:20:07 1993 UTC (30 years, 6 months ago) by glass
Branch: MAIN
CVS Tags: wnvm, to_lamp_cvs, nvm-base, nvm, magnum-base, first_uplaod
Branch point for: magnum

snapshot of intergration of torek's config

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>