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
1518}1518}
1519#endif1519#endif
1520 1520
1521#ifndef cpu_relax_yield
1522#define cpu_relax_yield(cpumask) cpu_relax()
1523#endif
1524
1525extern int yield_to(struct task_struct *p, bool preempt);1521extern int yield_to(struct task_struct *p, bool preempt);
1526extern void set_user_nice(struct task_struct *p, long nice);1522extern void set_user_nice(struct task_struct *p, long nice);
1527extern int task_prio(const struct task_struct *p);1523extern 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
36int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg);36int try_stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg);
37void stop_machine_park(int cpu);37void stop_machine_park(int cpu);
38void stop_machine_unpark(int cpu);38void stop_machine_unpark(int cpu);
39void stop_machine_yield(const struct cpumask *cpumask);
39 40
40#else /* CONFIG_SMP */41#else /* CONFIG_SMP */
41 42

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