Page MenuHomeFreeBSD

Don't define KLD_MODULE when build module with kernel
Needs ReviewPublic

Authored by on Apr 19 2016, 3:08 PM.
Referenced Files
Unknown Object (File)
Sun, May 28, 1:53 AM
Unknown Object (File)
Sat, May 6, 2:29 PM
Unknown Object (File)
Fri, May 5, 2:28 AM
Unknown Object (File)
Mar 6 2023, 4:05 AM
Unknown Object (File)
Feb 18 2023, 7:33 PM
Unknown Object (File)
Feb 13 2023, 11:27 PM
Unknown Object (File)
Dec 28 2022, 12:51 AM
Unknown Object (File)
Dec 15 2022, 10:09 AM



This remove the extra overhead when defining KLD_MODULE. The
performance gains from inline atomic(9) and mutex(9) functions.
However the modules built with kernel is not supposed to be used
with other kernel. In practical, this is unlikely happen.

The behavior of building a module standalone is not changed. This
maintain the compactibility for the out-of-tree modules as before.

Diff Detail

rS FreeBSD src repository - subversion
Lint Passed
No Test Coverage
Build Status
Buildable 3321
Build 3356: arc lint + arc unit

Event Timeline retitled this revision from to Don't define KLD_MODULE when build module with kernel. updated this object. edited the test plan for this revision. (Show Details) added a reviewer: jhb.

I tried a variant of this recently and it actually broke several things as there are some places that use KLD_MODULE for behavior that needs to be different even for modules tied to the kernel. I will perhaps add a new KLD_GENERIC_MODULE and replace some of the KLD_MODULE tests with that instead.