Where are bus passes with lower than default pass value called?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Where are bus passes with lower than default pass value called?

Jan Mazur
Here: http://bxr.su/FreeBSD/sys/kern/subr_bus.c#901
bus_current_pass is set to BUS_PASS_ROOT.

AFAIK autoconfiguration starts here:
http://bxr.su/FreeBSD/sys/mips/mips/autoconf.c#95 and later it
calls BUS_NEW_PASS(root_bus) which calls bus_set_pass(BUS_PASS_DEFAULT).
Why is it called with maximum possible bus pass level - BUS_PASS_DEFAULT?
Where are bus passes with lower pass value called?

JM
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-new-bus
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Where are bus passes with lower than default pass value called?

John Baldwin
On 5/28/18 3:16 AM, Jan Mazur wrote:
> Here: http://bxr.su/FreeBSD/sys/kern/subr_bus.c#901
> bus_current_pass is set to BUS_PASS_ROOT.
>
> AFAIK autoconfiguration starts here:
> http://bxr.su/FreeBSD/sys/mips/mips/autoconf.c#95 and later it
> calls BUS_NEW_PASS(root_bus) which calls bus_set_pass(BUS_PASS_DEFAULT).
> Why is it called with maximum possible bus pass level - BUS_PASS_DEFAULT?
> Where are bus passes with lower pass value called?

bus_set_pass() walks up from the current bus pass to the requested bus
pass stopping at each level that has a registered driver.  The intention
is that eventually we may want to insert SYSINITs in between some of
the passes in which case a SYSINIT would use bus_set_pass with a lower
level and then do some other work, but currently we don't have any of those,
so we are still just passing through all the levels in one SYSINIT.

--
John Baldwin
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-new-bus
To unsubscribe, send any mail to "[hidden email]"