.. | .. |
---|
19 | 19 | #define PERCPU_MODULE_RESERVE 0 |
---|
20 | 20 | #endif |
---|
21 | 21 | |
---|
22 | | -#ifdef CONFIG_PREEMPT_RT_FULL |
---|
23 | | - |
---|
24 | | -#define get_local_var(var) (*({ \ |
---|
25 | | - migrate_disable(); \ |
---|
26 | | - this_cpu_ptr(&var); })) |
---|
27 | | - |
---|
28 | | -#define put_local_var(var) do { \ |
---|
29 | | - (void)&(var); \ |
---|
30 | | - migrate_enable(); \ |
---|
31 | | -} while (0) |
---|
32 | | - |
---|
33 | | -# define get_local_ptr(var) ({ \ |
---|
34 | | - migrate_disable(); \ |
---|
35 | | - this_cpu_ptr(var); }) |
---|
36 | | - |
---|
37 | | -# define put_local_ptr(var) do { \ |
---|
38 | | - (void)(var); \ |
---|
39 | | - migrate_enable(); \ |
---|
40 | | -} while (0) |
---|
41 | | - |
---|
42 | | -#else |
---|
43 | | - |
---|
44 | | -#define get_local_var(var) get_cpu_var(var) |
---|
45 | | -#define put_local_var(var) put_cpu_var(var) |
---|
46 | | -#define get_local_ptr(var) get_cpu_ptr(var) |
---|
47 | | -#define put_local_ptr(var) put_cpu_ptr(var) |
---|
48 | | - |
---|
49 | | -#endif |
---|
50 | | - |
---|
51 | 22 | /* minimum unit size, also is the maximum supported allocation size */ |
---|
52 | 23 | #define PCPU_MIN_UNIT_SIZE PFN_ALIGN(32 << 10) |
---|
53 | 24 | |
---|
.. | .. |
---|
55 | 26 | #define PCPU_MIN_ALLOC_SHIFT 2 |
---|
56 | 27 | #define PCPU_MIN_ALLOC_SIZE (1 << PCPU_MIN_ALLOC_SHIFT) |
---|
57 | 28 | |
---|
58 | | -/* number of bits per page, used to trigger a scan if blocks are > PAGE_SIZE */ |
---|
59 | | -#define PCPU_BITS_PER_PAGE (PAGE_SIZE >> PCPU_MIN_ALLOC_SHIFT) |
---|
60 | | - |
---|
61 | 29 | /* |
---|
62 | | - * This determines the size of each metadata block. There are several subtle |
---|
63 | | - * constraints around this constant. The reserved region must be a multiple of |
---|
64 | | - * PCPU_BITMAP_BLOCK_SIZE. Additionally, PCPU_BITMAP_BLOCK_SIZE must be a |
---|
65 | | - * multiple of PAGE_SIZE or PAGE_SIZE must be a multiple of |
---|
66 | | - * PCPU_BITMAP_BLOCK_SIZE to align with the populated page map. The unit_size |
---|
67 | | - * also has to be a multiple of PCPU_BITMAP_BLOCK_SIZE to ensure full blocks. |
---|
| 30 | + * The PCPU_BITMAP_BLOCK_SIZE must be the same size as PAGE_SIZE as the |
---|
| 31 | + * updating of hints is used to manage the nr_empty_pop_pages in both |
---|
| 32 | + * the chunk and globally. |
---|
68 | 33 | */ |
---|
69 | 34 | #define PCPU_BITMAP_BLOCK_SIZE PAGE_SIZE |
---|
70 | 35 | #define PCPU_BITMAP_BLOCK_BITS (PCPU_BITMAP_BLOCK_SIZE >> \ |
---|
.. | .. |
---|
140 | 105 | int nr_units); |
---|
141 | 106 | extern void __init pcpu_free_alloc_info(struct pcpu_alloc_info *ai); |
---|
142 | 107 | |
---|
143 | | -extern int __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, |
---|
| 108 | +extern void __init pcpu_setup_first_chunk(const struct pcpu_alloc_info *ai, |
---|
144 | 109 | void *base_addr); |
---|
145 | 110 | |
---|
146 | 111 | #ifdef CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK |
---|