Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2012 16:41:24 +0100
From:      Marius Strobl <marius@alchemy.franken.de>
To:        John Baldwin <jhb@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r193833 - in head: share/man/man9 sys/kern sys/sys
Message-ID:  <20120129154124.GB18227@alchemy.franken.de>
In-Reply-To: <200906091426.n59EQNRC074046@svn.freebsd.org>
References:  <200906091426.n59EQNRC074046@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jun 09, 2009 at 02:26:23PM +0000, John Baldwin wrote:
> Author: jhb
> Date: Tue Jun  9 14:26:23 2009
> New Revision: 193833
> URL: http://svn.freebsd.org/changeset/base/193833
> 
> Log:
>   Add support for multiple passes of the device tree during the boot-time
>   probe.  The current device order is unchanged.  This commit just adds the
>   infrastructure and ABI changes so that it is easier to merge later changes
>   into 8.x.
>   - Driver attachments now have an associated pass level.  Attachments are
>     not allowed to probe or attach to drivers until the system-wide pass level
>     is >= the attachment's pass level.  By default driver attachments use the
>     "last" pass level (BUS_PASS_DEFAULT).  Driver's that wish to probe during
>     an earlier pass use EARLY_DRIVER_MODULE() instead of DRIVER_MODULE() which
>     accepts the pass level as an additional parameter.
>   - A new method BUS_NEW_PASS has been added to the bus interface.  This
>     method is invoked when the system-wide pass level is changed to kick off
>     a rescan of the device tree so that drivers that have just been made
>     "eligible" can probe and attach.
>   - The bus_generic_new_pass() function provides a default implementation of
>     BUS_NEW_PASS().  It first allows drivers that were just made eligible for
>     this pass to identify new child devices.  Then it propogates the rescan to
>     child devices that already have an attached driver by invoking their
>     BUS_NEW_PASS() method.  It also reprobes devices without a driver.
>   - BUS_PROBE_NOMATCH() is only invoked for devices that do not have
>     an attached driver after being scanned during the final pass.
>   - The bus_set_pass() function is used during boot to raise the pass level.
>     Currently it is only called once during root_bus_configure() to raise
>     the pass level to BUS_PASS_DEFAULT.  This has the effect of probing all
>     devices in a single pass identical to previous behavior.
>   
>   Reviewed by:	imp
>   Approved by:	re (kib)
> 

What would be necessary to finally enable support for multi-pass
probing apart from the drivers also needing to set BUS_PASS_n if
they want to take part earlier than BUS_PASS_DEFAULT)? My
understanding is that this is should be as simple as changing
root_bus_configure() to return BUS_PASS_ROOT instead of
BUS_PASS_DEFAULT but the comment above that line actually talks
about splitting the return value (?) up somehow ...

Marius




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120129154124.GB18227>