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. Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
This commit is contained in:
@@ -177,6 +177,11 @@ static void ack_state(struct multi_stop_data *msdata)
|
||||
set_state(msdata, msdata->state + 1);
|
||||
}
|
||||
|
||||
void __weak stop_machine_yield(const struct cpumask *cpumask)
|
||||
{
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
/* This is the cpu_stop function which stops the CPU. */
|
||||
static int multi_cpu_stop(void *data)
|
||||
{
|
||||
@@ -204,7 +209,7 @@ static int multi_cpu_stop(void *data)
|
||||
/* Simple state machine */
|
||||
do {
|
||||
/* Chill out and ensure we re-read multi_stop_state. */
|
||||
cpu_relax_yield(cpumask);
|
||||
stop_machine_yield(cpumask);
|
||||
if (msdata->state != curstate) {
|
||||
curstate = msdata->state;
|
||||
switch (curstate) {
|
||||
|
||||
Reference in New Issue
Block a user