Page MenuHomeFreeBSD

newbus: Add a set of bus resource helpers for nexus-like devices
ClosedPublic

Authored by jhb on Nov 23 2023, 8:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 12, 11:35 AM
Unknown Object (File)
Wed, May 8, 7:38 AM
Unknown Object (File)
Wed, May 8, 7:38 AM
Unknown Object (File)
Wed, May 8, 4:55 AM
Unknown Object (File)
Apr 16 2024, 5:06 PM
Unknown Object (File)
Apr 16 2024, 5:06 PM
Unknown Object (File)
Apr 16 2024, 5:05 PM
Unknown Object (File)
Apr 16 2024, 4:46 PM
Subscribers
None

Details

Summary

These routines can be used to implement
bus_alloc/adjust/activate/deactive/release_resource on bus drivers
which suballocate resources from rman(9) resource managers.

These methods require a new bus_get_rman method in the bus driver to
return the suitable rman for a given resource type. The
activate/deactivate helpers also require the bus to implement the
bus_map/ummap_resource methods.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb requested review of this revision.Nov 23 2023, 8:19 PM
jhb created this revision.

I've read all this code too many times. I was reminded again with your other recent changes that this would be a good clean up... was going to send an email after Thanksgiving dinner suggesting these changes. Thanks for doing this and saving me one email.

This revision is now accepted and ready to land.Nov 23 2023, 10:45 PM
In D42739#974987, @imp wrote:

I've read all this code too many times. I was reminded again with your other recent changes that this would be a good clean up... was going to send an email after Thanksgiving dinner suggesting these changes. Thanks for doing this and saving me one email.

I've had this branch for years, but am finally upstreaming some of it. Nice to cut down on some of the duplication. I need to probably write some manpages for this group though along with bus_generic_rl_*