mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Reviewed-by: Peng Fan <[email protected]>
This commit is contained in:
parent
047924c968
commit
92c14cab43
3 changed files with 57 additions and 73 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue