.. | .. |
---|
15 | 15 | #include <linux/cpumask.h> |
---|
16 | 16 | #include <linux/nodemask.h> |
---|
17 | 17 | #include <linux/mm.h> |
---|
| 18 | +#include <linux/mmu_context.h> |
---|
18 | 19 | #include <linux/jump_label.h> |
---|
19 | 20 | |
---|
20 | 21 | #ifdef CONFIG_CPUSETS |
---|
.. | .. |
---|
40 | 41 | |
---|
41 | 42 | static inline void cpuset_inc(void) |
---|
42 | 43 | { |
---|
43 | | - static_branch_inc(&cpusets_pre_enable_key); |
---|
44 | | - static_branch_inc(&cpusets_enabled_key); |
---|
| 44 | + static_branch_inc_cpuslocked(&cpusets_pre_enable_key); |
---|
| 45 | + static_branch_inc_cpuslocked(&cpusets_enabled_key); |
---|
45 | 46 | } |
---|
46 | 47 | |
---|
47 | 48 | static inline void cpuset_dec(void) |
---|
48 | 49 | { |
---|
49 | | - static_branch_dec(&cpusets_enabled_key); |
---|
50 | | - static_branch_dec(&cpusets_pre_enable_key); |
---|
| 50 | + static_branch_dec_cpuslocked(&cpusets_enabled_key); |
---|
| 51 | + static_branch_dec_cpuslocked(&cpusets_pre_enable_key); |
---|
51 | 52 | } |
---|
52 | 53 | |
---|
53 | 54 | extern int cpuset_init(void); |
---|
54 | 55 | extern void cpuset_init_smp(void); |
---|
55 | 56 | extern void cpuset_force_rebuild(void); |
---|
56 | 57 | extern void cpuset_update_active_cpus(void); |
---|
| 58 | +extern void cpuset_update_active_cpus_affine(int cpu); |
---|
57 | 59 | extern void cpuset_wait_for_hotplug(void); |
---|
58 | 60 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
---|
59 | 61 | extern void cpuset_cpus_allowed_fallback(struct task_struct *p); |
---|
.. | .. |
---|
160 | 162 | task_unlock(current); |
---|
161 | 163 | } |
---|
162 | 164 | |
---|
| 165 | +extern void cpuset_hotplug_workfn(struct work_struct *work); |
---|
| 166 | + |
---|
163 | 167 | #else /* !CONFIG_CPUSETS */ |
---|
164 | 168 | |
---|
165 | 169 | static inline bool cpusets_enabled(void) { return false; } |
---|
.. | .. |
---|
168 | 172 | static inline void cpuset_init_smp(void) {} |
---|
169 | 173 | |
---|
170 | 174 | static inline void cpuset_force_rebuild(void) { } |
---|
| 175 | + |
---|
| 176 | +static inline void cpuset_update_active_cpus_affine(int cpu) {} |
---|
171 | 177 | |
---|
172 | 178 | static inline void cpuset_update_active_cpus(void) |
---|
173 | 179 | { |
---|
.. | .. |
---|
179 | 185 | static inline void cpuset_cpus_allowed(struct task_struct *p, |
---|
180 | 186 | struct cpumask *mask) |
---|
181 | 187 | { |
---|
182 | | - cpumask_copy(mask, cpu_possible_mask); |
---|
| 188 | + cpumask_copy(mask, task_cpu_possible_mask(p)); |
---|
183 | 189 | } |
---|
184 | 190 | |
---|
185 | 191 | static inline void cpuset_cpus_allowed_fallback(struct task_struct *p) |
---|
.. | .. |
---|
275 | 281 | return false; |
---|
276 | 282 | } |
---|
277 | 283 | |
---|
| 284 | +static inline void cpuset_hotplug_workfn(struct work_struct *work) {} |
---|
| 285 | + |
---|
278 | 286 | #endif /* !CONFIG_CPUSETS */ |
---|
279 | 287 | |
---|
280 | 288 | #endif /* _LINUX_CPUSET_H */ |
---|