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)
Oct 17 2024, 5:58 AM
Unknown Object (File)
Oct 4 2024, 6:07 PM
Unknown Object (File)
Oct 4 2024, 4:55 PM
Unknown Object (File)
Oct 2 2024, 6:33 AM
Unknown Object (File)
Oct 1 2024, 6:24 PM
Unknown Object (File)
Oct 1 2024, 5:34 PM
Unknown Object (File)
Oct 1 2024, 4:05 PM
Unknown Object (File)
Sep 30 2024, 2:50 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_*