Commit | Line | Data |
---|---|---|
8fa3ed80 DZ |
1 | #ifndef _MM_PERCPU_INTERNAL_H |
2 | #define _MM_PERCPU_INTERNAL_H | |
3 | ||
4 | #include <linux/types.h> | |
5 | #include <linux/percpu.h> | |
6 | ||
7 | struct pcpu_chunk { | |
8 | struct list_head list; /* linked to pcpu_slot lists */ | |
9 | int free_size; /* free bytes in the chunk */ | |
10 | int contig_hint; /* max contiguous size hint */ | |
11 | void *base_addr; /* base address of this chunk */ | |
12 | ||
13 | int map_used; /* # of map entries used before the sentry */ | |
14 | int map_alloc; /* # of map entries allocated */ | |
15 | int *map; /* allocation map */ | |
16 | struct list_head map_extend_list;/* on pcpu_map_extend_chunks */ | |
17 | ||
18 | void *data; /* chunk data */ | |
19 | int first_free; /* no free below this */ | |
20 | bool immutable; /* no [de]population allowed */ | |
21 | int nr_populated; /* # of populated pages */ | |
22 | unsigned long populated[]; /* populated bitmap */ | |
23 | }; | |
24 | ||
25 | extern spinlock_t pcpu_lock; | |
26 | ||
27 | extern struct list_head *pcpu_slot; | |
28 | extern int pcpu_nr_slots; | |
29 | ||
30 | extern struct pcpu_chunk *pcpu_first_chunk; | |
31 | extern struct pcpu_chunk *pcpu_reserved_chunk; | |
32 | ||
33 | #endif |