aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/rman.9
diff options
context:
space:
mode:
authorElliott Mitchell <ehem+freebsd@m5p.com>2024-05-09 04:55:28 +0000
committerWarner Losh <imp@FreeBSD.org>2024-05-21 23:52:24 +0000
commit037946dc9b07f7e0085e71798f5b397c5d9597db (patch)
tree453f31628749b2f95a7d2ff7cc69e9d8189ef1cf /share/man/man9/rman.9
parentbeb1165a018d32f243c331a427dc212cf3b7febd (diff)
downloadsrc-037946dc9b07f7e0085e71798f5b397c5d9597db.tar.gz
src-037946dc9b07f7e0085e71798f5b397c5d9597db.zip
kern/rman: remove rman_reserve_resource_bound(), partially revert 13fb6657723
Not once has rman_reserve_resource_bound() ever been used. There are though several uses of RF_ALIGNMENT. In light of this remove this extra and leave the actually used portion in place. This partially reverts commit 13fb6657723c1e9cb47bbd286942b432a4306b96. Reviewed by: imp,jhb Pull Request: https://github.com/freebsd/freebsd-src/pull/1224
Diffstat (limited to 'share/man/man9/rman.9')
-rw-r--r--share/man/man9/rman.935
1 files changed, 9 insertions, 26 deletions
diff --git a/share/man/man9/rman.9 b/share/man/man9/rman.9
index 35a2d176233c..d175b60b4010 100644
--- a/share/man/man9/rman.9
+++ b/share/man/man9/rman.9
@@ -40,7 +40,6 @@
.Nm rman_last_free_region ,
.Nm rman_release_resource ,
.Nm rman_reserve_resource ,
-.Nm rman_reserve_resource_bound ,
.Nm rman_make_alignment_flags ,
.Nm rman_get_start ,
.Nm rman_get_end ,
@@ -90,11 +89,6 @@
.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count"
.Fa "u_int flags" "device_t dev"
.Fc
-.Ft "struct resource *"
-.Fo rman_reserve_resource_bound
-.Fa "struct rman *rm" "rman_res_t start" "rman_res_t end" "rman_res_t count"
-.Fa "rman_res_t bound" "u_int flags" "device_t dev"
-.Fc
.Ft uint32_t
.Fn rman_make_alignment_flags "uint32_t size"
.Ft rman_res_t
@@ -266,7 +260,7 @@ and
are set to the bounds of the free region and zero is returned.
.Pp
The
-.Fn rman_reserve_resource_bound
+.Fn rman_reserve_resource
function is where the bulk of the
.Nm
logic is located.
@@ -279,7 +273,7 @@ The caller can specify the
and
.Fa end
of an acceptable range,
-as well as a boundary restriction and required alignment,
+required alignment,
and the code will attempt to find a free segment which fits.
The
.Fa start
@@ -296,15 +290,13 @@ The alignment requirement
.Pq if any
is specified in
.Fa flags .
-The
-.Fa bound
-argument may be set to specify a boundary restriction such that an
-allocated region may cross an address that is a multiple of the
-boundary.
-The
-.Fa bound
-argument must be a power of two.
-It may be set to zero to specify no boundary restriction.
+Often the
+.Dv RF_ALIGNMENT_LOG2
+macro is used to specify alignment to a power-of-2 size, or
+.Fn rman_make_alignment_flags
+can be used to compute the
+.Fa flags
+value at runtime.
A shared segment will be allocated if the
.Dv RF_SHAREABLE
flag is set, otherwise an exclusive segment will be allocated.
@@ -312,15 +304,6 @@ If this shared segment already exists, the caller has its device
added to the list of consumers.
.Pp
The
-.Fn rman_reserve_resource
-function is used to reserve resources within a previously established region.
-It is a simplified interface to
-.Fn rman_reserve_resource_bound
-which passes 0 for the
-.Fa bound
-argument.
-.Pp
-The
.Fn rman_make_alignment_flags
function returns the flag mask corresponding to the desired alignment
.Fa size .