aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2021-12-17 12:17:22 +1000
committerCédric Le Goater <clg@kaod.org>2021-12-17 10:34:23 +0100
commit9cf2093c9d4a57d658df32577cb801e7056ae937 (patch)
treeb31cf8a6abc7f9e045db639ca30ed2c15d1786cb
parent3ff8fa0acc6aa3b3598cdb3e30fdf80257125740 (diff)
downloadskiboot-9cf2093c9d4a57d658df32577cb801e7056ae937.zip
skiboot-9cf2093c9d4a57d658df32577cb801e7056ae937.tar.gz
skiboot-9cf2093c9d4a57d658df32577cb801e7056ae937.tar.bz2
core/cpu: move cpu_wake out of job_lock
There is no need to send the IPI while holding the job_lock. If the target does wake after the job is queued and before we send the IPI, it will check for new jobs anyway. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
-rw-r--r--core/cpu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/cpu.c b/core/cpu.c
index b82b615..2a3f708 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -198,8 +198,9 @@ static void queue_job_on_cpu(struct cpu_thread *cpu, struct cpu_job *job)
cpu->job_has_no_return = true;
else
cpu->job_count++;
- cpu_wake(cpu);
unlock(&cpu->job_lock);
+
+ cpu_wake(cpu);
}
struct cpu_job *__cpu_queue_job(struct cpu_thread *cpu,