Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Apr 2016 10:43:17 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   Re: Mis-use of BUS_PASS_ORDER_MIDDLE
Message-ID:  <1611132.EbTME86UTe@ralph.baldwin.cx>
In-Reply-To: <CAAvnz_rmbgM9t47eqV91ASXHddJjMyEucpF4_f-3Ed5pNoM8Bw@mail.gmail.com>
References:  <CAAvnz_rmbgM9t47eqV91ASXHddJjMyEucpF4_f-3Ed5pNoM8Bw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, April 18, 2016 11:10:12 PM Howard Su wrote:
> I noticed several places there are code like this, especially in some=
 arm
> low level drivers.
> EARLY_DRIVER_MODULE(aw_ccu, simplebus, aw_ccu_driver, aw_ccu_devclass=
,
>     0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE);
>=20
> =E2=80=8BI feel the usage of BUS_PASS_ORDER_MIDDLE is misused. There =
are another
> macro EARLY_DRIVER_MODULE_ORDERED, which take an additional parameter=

> "order". I believe BUS_PASS_ORDER_xxx is used for that parameter.

No, this is actually correct.  The _ORDERED variants actually accept a
SI_ORDER_* value to determine how drivers contained in a single .ko fil=
e
are registered (in particular if you have several drivers in a .ko file=

you typically want the "top-most" driver to attach last so that all the=

other drivers are ready once the actual device is attached).

--=20
John Baldwin



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