[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 66/73] riscv: convert to cpu_has_work_with_iothre
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v5 66/73] riscv: convert to cpu_has_work_with_iothread_lock |
Date: |
Thu, 13 Dec 2018 00:04:46 -0500 |
Soon we will call cpu_has_work without the BQL.
Cc: Michael Clark <address@hidden>
Cc: Palmer Dabbelt <address@hidden>
Cc: Sagar Karandikar <address@hidden>
Cc: Bastian Koppelmann <address@hidden>
Reviewed-by: Palmer Dabbelt <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
---
target/riscv/cpu.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c
index a025a0a3ba..9de76be471 100644
--- a/target/riscv/cpu.c
+++ b/target/riscv/cpu.c
@@ -251,6 +251,9 @@ static bool riscv_cpu_has_work(CPUState *cs)
#ifndef CONFIG_USER_ONLY
RISCVCPU *cpu = RISCV_CPU(cs);
CPURISCVState *env = &cpu->env;
+
+ g_assert(qemu_mutex_iothread_locked());
+
/*
* Definition of the WFI instruction requires it to ignore the privilege
* mode and delegation registers, but respect individual enables
@@ -337,7 +340,7 @@ static void riscv_cpu_class_init(ObjectClass *c, void *data)
cc->reset = riscv_cpu_reset;
cc->class_by_name = riscv_cpu_class_by_name;
- cc->has_work = riscv_cpu_has_work;
+ cc->has_work_with_iothread_lock = riscv_cpu_has_work;
cc->do_interrupt = riscv_cpu_do_interrupt;
cc->cpu_exec_interrupt = riscv_cpu_exec_interrupt;
cc->dump_state = riscv_cpu_dump_state;
--
2.17.1
- [Qemu-devel] [PATCH v5 30/73] cpu-exec: convert to cpu_halted, (continued)
- [Qemu-devel] [PATCH v5 30/73] cpu-exec: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 32/73] cpu: define cpu_interrupt_request helpers, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 31/73] cpu: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 39/73] i386: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 43/73] i386/hvf: convert to cpu_request_interrupt, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 46/73] cris: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 40/73] i386/kvm: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 50/73] mips: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 36/73] s390x: use cpu_reset_interrupt, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 29/73] openrisc: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 66/73] riscv: convert to cpu_has_work_with_iothread_lock,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v5 18/73] ppc: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 23/73] mips: convert to cpu_halted, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 37/73] openrisc: use cpu_reset_interrupt, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 42/73] i386/whpx-all: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 35/73] i386: use cpu_reset_interrupt, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 49/73] m68k: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 33/73] ppc: use cpu_reset_interrupt, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 45/73] sh4: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13
- [Qemu-devel] [PATCH v5 48/73] lm32: convert to cpu_interrupt_request, Emilio G. Cota, 2018/12/13