stop_machine is the only user left of cpu_relax_yield. Given that it now has special semantics which are tied to stop_machine introduce a weak stop_machine_yield function which architectures can override, and get rid of the generic cpu_relax_yield implementation.
Showing the changes to include/linux (2 of 5 files). Show all
Unified · Split
| @@ -1518,10 +1518,6 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpuma · 1517 unmodified lines | |||
| 1518 | } | 1518 | } |
| 1519 | #endif | 1519 | #endif |
| 1520 | 1520 | ||
| 1521 | #ifndef cpu_relax_yield | ||
| 1522 | #define cpu_relax_yield(cpumask) cpu_relax() | ||
| 1523 | #endif | ||
| 1524 | |||
| 1525 | extern int yield_to(struct task_struct *p, bool preempt); | 1521 | extern int yield_to(struct task_struct *p, bool preempt); |
| 1526 | extern void set_user_nice(struct task_struct *p, long nice); | 1522 | extern void set_user_nice(struct task_struct *p, long nice); |
| 1527 | extern int task_prio(const struct task_struct *p); | 1523 | extern int task_prio(const struct task_struct *p); |
| @@ -36,6 +36,7 @@ int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); · 35 unmodified lines | |||
| 36 | int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); | 36 | int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); |
| 37 | void stop_machine_park(int cpu); | 37 | void stop_machine_park(int cpu); |
| 38 | void stop_machine_unpark(int cpu); | 38 | void stop_machine_unpark(int cpu); |
| 39 | void stop_machine_yield(const struct cpumask *cpumask); | ||
| 39 | 40 | ||
| 40 | #else /* CONFIG_SMP */ | 41 | #else /* CONFIG_SMP */ |
| 41 | 42 | ||