.. | .. |
---|
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); |
---|
| 60 | +extern void inc_dl_tasks_cs(struct task_struct *task); |
---|
| 61 | +extern void dec_dl_tasks_cs(struct task_struct *task); |
---|
| 62 | +extern void cpuset_lock(void); |
---|
| 63 | +extern void cpuset_unlock(void); |
---|
58 | 64 | extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); |
---|
59 | 65 | extern void cpuset_cpus_allowed_fallback(struct task_struct *p); |
---|
60 | 66 | extern nodemask_t cpuset_mems_allowed(struct task_struct *p); |
---|
.. | .. |
---|
160 | 166 | task_unlock(current); |
---|
161 | 167 | } |
---|
162 | 168 | |
---|
| 169 | +extern void cpuset_hotplug_workfn(struct work_struct *work); |
---|
| 170 | + |
---|
163 | 171 | #else /* !CONFIG_CPUSETS */ |
---|
164 | 172 | |
---|
165 | 173 | static inline bool cpusets_enabled(void) { return false; } |
---|
.. | .. |
---|
169 | 177 | |
---|
170 | 178 | static inline void cpuset_force_rebuild(void) { } |
---|
171 | 179 | |
---|
| 180 | +static inline void cpuset_update_active_cpus_affine(int cpu) {} |
---|
| 181 | + |
---|
172 | 182 | static inline void cpuset_update_active_cpus(void) |
---|
173 | 183 | { |
---|
174 | 184 | partition_sched_domains(1, NULL, NULL); |
---|
.. | .. |
---|
176 | 186 | |
---|
177 | 187 | static inline void cpuset_wait_for_hotplug(void) { } |
---|
178 | 188 | |
---|
| 189 | +static inline void inc_dl_tasks_cs(struct task_struct *task) { } |
---|
| 190 | +static inline void dec_dl_tasks_cs(struct task_struct *task) { } |
---|
| 191 | +static inline void cpuset_lock(void) { } |
---|
| 192 | +static inline void cpuset_unlock(void) { } |
---|
| 193 | + |
---|
179 | 194 | static inline void cpuset_cpus_allowed(struct task_struct *p, |
---|
180 | 195 | struct cpumask *mask) |
---|
181 | 196 | { |
---|
182 | | - cpumask_copy(mask, cpu_possible_mask); |
---|
| 197 | + cpumask_copy(mask, task_cpu_possible_mask(p)); |
---|
183 | 198 | } |
---|
184 | 199 | |
---|
185 | 200 | static inline void cpuset_cpus_allowed_fallback(struct task_struct *p) |
---|
.. | .. |
---|
275 | 290 | return false; |
---|
276 | 291 | } |
---|
277 | 292 | |
---|
| 293 | +static inline void cpuset_hotplug_workfn(struct work_struct *work) {} |
---|
| 294 | + |
---|
278 | 295 | #endif /* !CONFIG_CPUSETS */ |
---|
279 | 296 | |
---|
280 | 297 | #endif /* _LINUX_CPUSET_H */ |
---|