hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/Documentation/core-api/genalloc.rst
....@@ -23,7 +23,7 @@
2323 .. kernel-doc:: lib/genalloc.c
2424 :functions: devm_gen_pool_create
2525
26
-A call to :c:func:`gen_pool_create` will create a pool. The granularity of
26
+A call to gen_pool_create() will create a pool. The granularity of
2727 allocations is set with min_alloc_order; it is a log-base-2 number like
2828 those used by the page allocator, but it refers to bytes rather than pages.
2929 So, if min_alloc_order is passed as 3, then all allocations will be a
....@@ -32,7 +32,7 @@
3232 which NUMA node should be used for the allocation of the housekeeping
3333 structures; it can be -1 if the caller doesn't care.
3434
35
-The "managed" interface :c:func:`devm_gen_pool_create` ties the pool to a
35
+The "managed" interface devm_gen_pool_create() ties the pool to a
3636 specific device. Among other things, it will automatically clean up the
3737 pool when the given device is destroyed.
3838
....@@ -53,32 +53,32 @@
5353 :functions: gen_pool_add
5454
5555 .. kernel-doc:: lib/genalloc.c
56
- :functions: gen_pool_add_virt
56
+ :functions: gen_pool_add_owner
5757
58
-A call to :c:func:`gen_pool_add` will place the size bytes of memory
58
+A call to gen_pool_add() will place the size bytes of memory
5959 starting at addr (in the kernel's virtual address space) into the given
6060 pool, once again using nid as the node ID for ancillary memory allocations.
61
-The :c:func:`gen_pool_add_virt` variant associates an explicit physical
61
+The gen_pool_add_virt() variant associates an explicit physical
6262 address with the memory; this is only necessary if the pool will be used
6363 for DMA allocations.
6464
6565 The functions for allocating memory from the pool (and putting it back)
6666 are:
6767
68
-.. kernel-doc:: lib/genalloc.c
68
+.. kernel-doc:: include/linux/genalloc.h
6969 :functions: gen_pool_alloc
7070
7171 .. kernel-doc:: lib/genalloc.c
7272 :functions: gen_pool_dma_alloc
7373
7474 .. kernel-doc:: lib/genalloc.c
75
- :functions: gen_pool_free
75
+ :functions: gen_pool_free_owner
7676
77
-As one would expect, :c:func:`gen_pool_alloc` will allocate size< bytes
78
-from the given pool. The :c:func:`gen_pool_dma_alloc` variant allocates
77
+As one would expect, gen_pool_alloc() will allocate size< bytes
78
+from the given pool. The gen_pool_dma_alloc() variant allocates
7979 memory for use with DMA operations, returning the associated physical
8080 address in the space pointed to by dma. This will only work if the memory
81
-was added with :c:func:`gen_pool_add_virt`. Note that this function
81
+was added with gen_pool_add_virt(). Note that this function
8282 departs from the usual genpool pattern of using unsigned long values to
8383 represent kernel addresses; it returns a void * instead.
8484
....@@ -89,14 +89,14 @@
8989 of interest:
9090
9191 .. kernel-doc:: lib/genalloc.c
92
- :functions: gen_pool_alloc_algo
92
+ :functions: gen_pool_alloc_algo_owner
9393
9494 .. kernel-doc:: lib/genalloc.c
9595 :functions: gen_pool_set_algo
9696
97
-Allocations with :c:func:`gen_pool_alloc_algo` specify an algorithm to be
97
+Allocations with gen_pool_alloc_algo() specify an algorithm to be
9898 used to choose the memory to be allocated; the default algorithm can be set
99
-with :c:func:`gen_pool_set_algo`. The data value is passed to the
99
+with gen_pool_set_algo(). The data value is passed to the
100100 algorithm; most ignore it, but it is occasionally needed. One can,
101101 naturally, write a special-purpose algorithm, but there is a fair set
102102 already available:
....@@ -129,7 +129,7 @@
129129 :functions: gen_pool_for_each_chunk
130130
131131 .. kernel-doc:: lib/genalloc.c
132
- :functions: addr_in_gen_pool
132
+ :functions: gen_pool_has_addr
133133
134134 .. kernel-doc:: lib/genalloc.c
135135 :functions: gen_pool_avail