percpu: convert chunk hints to be based on pcpu_block_md
As mentioned in the last patch, a chunk's hints are no different than a block just responsible for more bits. This converts chunk level hints to use a pcpu_block_md to maintain them. This lets us reuse the same hint helper functions as a block. The left_free and right_free are unused by the chunk's pcpu_block_md. Signed-off-by: Dennis Zhou <dennis@kernel.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
@@ -39,9 +39,7 @@ struct pcpu_chunk {
|
||||
|
||||
struct list_head list; /* linked to pcpu_slot lists */
|
||||
int free_bytes; /* free bytes in the chunk */
|
||||
int contig_bits; /* max contiguous size hint */
|
||||
int contig_bits_start; /* contig_bits starting
|
||||
offset */
|
||||
struct pcpu_block_md chunk_md;
|
||||
void *base_addr; /* base address of this chunk */
|
||||
|
||||
unsigned long *alloc_map; /* allocation map */
|
||||
@@ -49,7 +47,6 @@ struct pcpu_chunk {
|
||||
struct pcpu_block_md *md_blocks; /* metadata blocks */
|
||||
|
||||
void *data; /* chunk data */
|
||||
int first_bit; /* no free below this */
|
||||
bool immutable; /* no [de]population allowed */
|
||||
int start_offset; /* the overlap with the previous
|
||||
region to have a page aligned
|
||||
|
||||
Reference in New Issue
Block a user