History

processor: get rid of cpu_relax_yield

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.

Heiko Carstens committed 7 years ago

Commit 4ecf0a41 parent 38f2c695 files · +9 −13Browse files

Showing the changes to include/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/sched.h +0 −4
  2. include/linux/stop_machine.h +1 −0
include/linux/sched.h+0−4
@@ -1518,10 +1518,6 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p, const struct cpuma · 1517 unmodified lines
15181518 }
15191519 #endif
15201520
1521−#ifndef cpu_relax_yield
1522−#define cpu_relax_yield(cpumask) cpu_relax()
1523−#endif
1524−
15251521 extern int yield_to(struct task_struct *p, bool preempt);
15261522 extern void set_user_nice(struct task_struct *p, long nice);
15271523 extern int task_prio(const struct task_struct *p);
include/linux/stop_machine.h+1−0
@@ -36,6 +36,7 @@ int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg); · 35 unmodified lines
3636 int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg);
3737 void stop_machine_park(int cpu);
3838 void stop_machine_unpark(int cpu);
39+void stop_machine_yield(const struct cpumask *cpumask);
3940
4041 #else /* CONFIG_SMP */
4142

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t