[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v7 50/73] mips: convert to cpu_interrupt_request
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [PATCH v7 50/73] mips: convert to cpu_interrupt_request |
Date: |
Mon, 4 Mar 2019 13:17:50 -0500 |
Cc: Aurelien Jarno <address@hidden>
Cc: Aleksandar Markovic <address@hidden>
Cc: James Hogan <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
---
target/mips/cpu.c | 7 ++++---
target/mips/kvm.c | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index e217fb3e36..fdae8cf440 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -56,11 +56,12 @@ static bool mips_cpu_has_work(CPUState *cs)
MIPSCPU *cpu = MIPS_CPU(cs);
CPUMIPSState *env = &cpu->env;
bool has_work = false;
+ uint32_t interrupt_request = cpu_interrupt_request(cs);
/* Prior to MIPS Release 6 it is implementation dependent if non-enabled
interrupts wake-up the CPU, however most of the implementations only
check for interrupts that can be taken. */
- if ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
+ if ((interrupt_request & CPU_INTERRUPT_HARD) &&
cpu_mips_hw_interrupts_pending(env)) {
if (cpu_mips_hw_interrupts_enabled(env) ||
(env->insn_flags & ISA_MIPS32R6)) {
@@ -72,7 +73,7 @@ static bool mips_cpu_has_work(CPUState *cs)
if (env->CP0_Config3 & (1 << CP0C3_MT)) {
/* The QEMU model will issue an _WAKE request whenever the CPUs
should be woken up. */
- if (cs->interrupt_request & CPU_INTERRUPT_WAKE) {
+ if (interrupt_request & CPU_INTERRUPT_WAKE) {
has_work = true;
}
@@ -82,7 +83,7 @@ static bool mips_cpu_has_work(CPUState *cs)
}
/* MIPS Release 6 has the ability to halt the CPU. */
if (env->CP0_Config5 & (1 << CP0C5_VP)) {
- if (cs->interrupt_request & CPU_INTERRUPT_WAKE) {
+ if (interrupt_request & CPU_INTERRUPT_WAKE) {
has_work = true;
}
if (!mips_vp_active(env)) {
diff --git a/target/mips/kvm.c b/target/mips/kvm.c
index 0b177a7577..568c3d8f4a 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -135,7 +135,7 @@ void kvm_arch_pre_run(CPUState *cs, struct kvm_run *run)
qemu_mutex_lock_iothread();
- if ((cs->interrupt_request & CPU_INTERRUPT_HARD) &&
+ if ((cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) &&
cpu_mips_io_interrupts_pending(cpu)) {
intr.cpu = -1;
intr.irq = 2;
--
2.17.1
- [Qemu-devel] [PATCH v7 00/73] per-CPU locks, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 05/73] cpu: move run_on_cpu to cpus-common, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 01/73] cpu: convert queued work to a QSIMPLEQ, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 08/73] tcg-runtime: define helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 06/73] cpu: introduce process_queued_cpu_work_locked, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 04/73] cpu: make qemu_work_cond per-cpu, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 09/73] ppc: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 07/73] cpu: make per-CPU locks an alias of the BQL in TCG rr mode, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 23/73] mips: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 50/73] mips: convert to cpu_interrupt_request,
Emilio G. Cota <=
- [Qemu-devel] [PATCH v7 03/73] cpu: introduce cpu_mutex_lock/unlock, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 02/73] cpu: rename cpu->work_mutex to cpu->lock, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 11/73] hppa: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 10/73] cris: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 15/73] cpu: define cpu_halted helpers, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 12/73] m68k: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 14/73] microblaze: convert to helper_cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 16/73] tcg-runtime: convert to cpu_halted_set, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 21/73] lm32: convert to cpu_halted, Emilio G. Cota, 2019/03/04
- [Qemu-devel] [PATCH v7 20/73] i386: convert to cpu_halted, Emilio G. Cota, 2019/03/04