Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Mar 2018 09:40:25 -0800
From:      John Baldwin <jhb@freebsd.org>
To:        Emmanuel Vadot <manu@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r330335 - head/sys/sys
Message-ID:  <1619920.YOJitH0Jj0@ralph.baldwin.cx>
In-Reply-To: <201803031243.w23ChBMQ096308@repo.freebsd.org>
References:  <201803031243.w23ChBMQ096308@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday, March 03, 2018 12:43:11 PM Emmanuel Vadot wrote:
> Author: manu
> Date: Sat Mar  3 12:43:11 2018
> New Revision: 330335
> URL: https://svnweb.freebsd.org/changeset/base/330335
> 
> Log:
>   Introduce BUS_PASS_SUPPORTDEV
>   
>   The reason for this new pass is :
>   
>   The earlier pass names are really specific (interrupt, timer, scheduler etc ..)
>   and making a driver that other device driver (that attach at DEFAULT pass)
>   needs probe at earlier pass can be confiusing. We can live with GPIO driver
>   at INTERRUPT pass because they are often an interrupt controller too but having
>   a usb phy driver probed at RESOURCES (or SCHEDULER for example) is silly.
>   The number was choosen to have a lot of margin if we want to introduce other
>   pass in the futur.
>   
>   Reviewed by:	ian, imp, kevans
>   Differential Revision:	https://reviews.freebsd.org/D14568

I have a different issue on x86 which is that I want acpi0 to kind of probe even
before BUS_PASS_BUS.  I've wondered if the pass stuff actually needs to be
recursive in some way.  That is, when a bus first enumerates children, we start
probing drivers for those children starting at pass 0 and working up to the
current global pass level before increasing the global pass level.  This scheme
would also making bus passes still operate the same in a post-boot environment
as the I think an implementation would mean that each bus device had its own
pass level that governed the attach logic and we would raise that pass level
up across the different levels to the current level when attaching a new bus
device.  (I would perhaps handle this logic in bus_generic_attach() to make it
transparent to bus drivers.)  Do you have any thoughts on that and if it would
help with any situations you are aware of?  It would mean that if some new bus
was discovered when the global pass level was a higher number, the new bus could
still "step up" through the pass levels.

-- 
John Baldwin



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