aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/pchtherm
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2026-03-06 21:32:33 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2026-03-06 21:32:33 +0000
commit1e4086d05297b711081fe06933677925c5ee6232 (patch)
treee6320505db98e7fb3f2dcf645bf78f9e0b3e4dda /sys/modules/pchtherm
parentca25b1b26379e27bf2bab7742a7b383ca0bfc7d2 (diff)
sys: Don't pass RF_ALLOCATED to bus_alloc_resource*HEADmain
This is a nop as eventually these flags are passed to rman_reserve_resource which unconditionally sets RF_ALLOCATED in the new flags for a region. However, it's really a layering violation to use RF_ALLOCATED in relation to struct resource objects outside of subr_rman.c as subr_rman.c uses this flag to manage it's internal tracking of allocated vs free regions. In addition, don't document this as a valid flag in the manual. I think the intention here was that if a caller didn't want to pass RF_ACTIVE or RF_SHAREABLE, they could pass RF_ALLOCATED instead of 0, but given the layering violation, I think it's best to just pass 0 instead in that case. NB: The bhnd bus uses RF_ALLOCATED (along with RF_ACTIVE) in a separate API to manage resource regions that are not struct resource objects (but a separate wrapper object). It would perhaps be cleaner if the chipc_retain_region and chipc_release_region functions used their own flag constants instead of reusing the rman(9) flags. Reviewed by: imp, kib Differential Revision: https://reviews.freebsd.org/D55683
Diffstat (limited to 'sys/modules/pchtherm')
0 files changed, 0 insertions, 0 deletions