.. | .. |
---|
204 | 204 | extern void ___might_sleep(const char *file, int line, int preempt_offset); |
---|
205 | 205 | extern void __might_sleep(const char *file, int line, int preempt_offset); |
---|
206 | 206 | extern void __cant_sleep(const char *file, int line, int preempt_offset); |
---|
207 | | -extern void __cant_migrate(const char *file, int line); |
---|
208 | 207 | |
---|
209 | 208 | /** |
---|
210 | 209 | * might_sleep - annotation for functions that can sleep |
---|
.. | .. |
---|
220 | 219 | */ |
---|
221 | 220 | # define might_sleep() \ |
---|
222 | 221 | do { __might_sleep(__FILE__, __LINE__, 0); might_resched(); } while (0) |
---|
223 | | - |
---|
224 | | -# define might_sleep_no_state_check() \ |
---|
225 | | - do { ___might_sleep(__FILE__, __LINE__, 0); } while (0) |
---|
226 | | - |
---|
227 | 222 | /** |
---|
228 | 223 | * cant_sleep - annotation for functions that cannot sleep |
---|
229 | 224 | * |
---|
.. | .. |
---|
232 | 227 | # define cant_sleep() \ |
---|
233 | 228 | do { __cant_sleep(__FILE__, __LINE__, 0); } while (0) |
---|
234 | 229 | # define sched_annotate_sleep() (current->task_state_change = 0) |
---|
235 | | - |
---|
236 | | -/** |
---|
237 | | - * cant_migrate - annotation for functions that cannot migrate |
---|
238 | | - * |
---|
239 | | - * Will print a stack trace if executed in code which is migratable |
---|
240 | | - */ |
---|
241 | | -# define cant_migrate() \ |
---|
242 | | - do { \ |
---|
243 | | - if (IS_ENABLED(CONFIG_SMP)) \ |
---|
244 | | - __cant_migrate(__FILE__, __LINE__); \ |
---|
245 | | - } while (0) |
---|
246 | | - |
---|
247 | 230 | /** |
---|
248 | 231 | * non_block_start - annotate the start of section where sleeping is prohibited |
---|
249 | 232 | * |
---|
.. | .. |
---|
267 | 250 | static inline void __might_sleep(const char *file, int line, |
---|
268 | 251 | int preempt_offset) { } |
---|
269 | 252 | # define might_sleep() do { might_resched(); } while (0) |
---|
270 | | -# define might_sleep_no_state_check() do { might_resched(); } while (0) |
---|
271 | 253 | # define cant_sleep() do { } while (0) |
---|
272 | | -# define cant_migrate() do { } while (0) |
---|
273 | 254 | # define sched_annotate_sleep() do { } while (0) |
---|
274 | 255 | # define non_block_start() do { } while (0) |
---|
275 | 256 | # define non_block_end() do { } while (0) |
---|
.. | .. |
---|
277 | 258 | |
---|
278 | 259 | #define might_sleep_if(cond) do { if (cond) might_sleep(); } while (0) |
---|
279 | 260 | |
---|
| 261 | +#ifndef CONFIG_PREEMPT_RT |
---|
| 262 | +# define cant_migrate() cant_sleep() |
---|
| 263 | +#else |
---|
| 264 | + /* Placeholder for now */ |
---|
| 265 | +# define cant_migrate() do { } while (0) |
---|
| 266 | +#endif |
---|
| 267 | + |
---|
280 | 268 | /** |
---|
281 | 269 | * abs - return absolute value of an argument |
---|
282 | 270 | * @x: the value. If it is unsigned type, it is converted to signed type first. |
---|