[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 70/74] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu
From: |
Robert Foley |
Subject: |
[PATCH v8 70/74] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle |
Date: |
Thu, 26 Mar 2020 15:31:52 -0400 |
From: "Emilio G. Cota" <address@hidden>
This function is only called from TCG rr mode, so add
a prefix to mark this as well as an assertion.
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Robert Foley <address@hidden>
---
cpus.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/cpus.c b/cpus.c
index 50ced4369f..05de56bd53 100644
--- a/cpus.c
+++ b/cpus.c
@@ -232,10 +232,12 @@ static bool cpu_thread_is_idle(CPUState *cpu)
return true;
}
-static bool all_cpu_threads_idle(void)
+static bool qemu_tcg_rr_all_cpu_threads_idle(void)
{
CPUState *cpu;
+ g_assert(qemu_is_tcg_rr());
+
CPU_FOREACH(cpu) {
if (!cpu_thread_is_idle(cpu)) {
return false;
@@ -643,7 +645,7 @@ void qemu_start_warp_timer(void)
}
if (replay_mode != REPLAY_MODE_PLAY) {
- if (!all_cpu_threads_idle()) {
+ if (!qemu_tcg_rr_all_cpu_threads_idle()) {
return;
}
@@ -1295,7 +1297,7 @@ static void qemu_tcg_rr_wait_io_event(void)
{
CPUState *cpu;
- while (all_cpu_threads_idle()) {
+ while (qemu_tcg_rr_all_cpu_threads_idle()) {
stop_tcg_kick_timer();
qemu_cond_wait(first_cpu->halt_cond, &qemu_global_mutex);
}
@@ -1651,7 +1653,7 @@ static void *qemu_tcg_rr_cpu_thread_fn(void *arg)
atomic_mb_set(&cpu->exit_request, 0);
}
- if (use_icount && all_cpu_threads_idle()) {
+ if (use_icount && qemu_tcg_rr_all_cpu_threads_idle()) {
/*
* When all cpus are sleeping (e.g in WFI), to avoid a deadlock
* in the main_loop, wake it up in order to start the warp timer.
--
2.17.1
- [PATCH v8 44/74] i386/hvf: convert to cpu_request_interrupt, (continued)
- [PATCH v8 44/74] i386/hvf: convert to cpu_request_interrupt, Robert Foley, 2020/03/26
- [PATCH v8 61/74] cpu: convert to interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 62/74] cpu: call .cpu_has_work with the CPU lock held, Robert Foley, 2020/03/26
- [PATCH v8 63/74] cpu: introduce cpu_has_work_with_iothread_lock, Robert Foley, 2020/03/26
- [PATCH v8 64/74] ppc: convert to cpu_has_work_with_iothread_lock, Robert Foley, 2020/03/26
- [PATCH v8 65/74] mips: convert to cpu_has_work_with_iothread_lock, Robert Foley, 2020/03/26
- [PATCH v8 66/74] s390x: convert to cpu_has_work_with_iothread_lock, Robert Foley, 2020/03/26
- [PATCH v8 67/74] riscv: convert to cpu_has_work_with_iothread_lock, Robert Foley, 2020/03/26
- [PATCH v8 68/74] sparc: convert to cpu_has_work_with_iothread_lock, Robert Foley, 2020/03/26
- [PATCH v8 69/74] xtensa: convert to cpu_has_work_with_iothread_lock, Robert Foley, 2020/03/26
- [PATCH v8 70/74] cpu: rename all_cpu_threads_idle to qemu_tcg_rr_all_cpu_threads_idle,
Robert Foley <=
- [PATCH v8 72/74] cpus-common: release BQL earlier in run_on_cpu, Robert Foley, 2020/03/26
- [PATCH v8 71/74] cpu: protect CPU state with cpu->lock instead of the BQL, Robert Foley, 2020/03/26
- [PATCH v8 73/74] cpu: add async_run_on_cpu_no_bql, Robert Foley, 2020/03/26
- [PATCH v8 74/74] cputlb: queue async flush jobs without the BQL, Robert Foley, 2020/03/26
- Re: [PATCH v8 00/74] per-CPU locks, Aleksandar Markovic, 2020/03/26
Re: [PATCH v8 00/74] per-CPU locks, Emilio G. Cota, 2020/03/27