[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 51/74] mips: convert to cpu_interrupt_request
From: |
Robert Foley |
Subject: |
[PATCH v8 51/74] mips: convert to cpu_interrupt_request |
Date: |
Thu, 26 Mar 2020 15:31:33 -0400 |
From: "Emilio G. Cota" <address@hidden>
Cc: Aurelien Jarno <address@hidden>
Cc: Aleksandar Markovic <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Emilio G. Cota <address@hidden>
Signed-off-by: Robert Foley <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 e86cd06548..761d8aaa54 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -56,13 +56,14 @@ 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)) {
@@ -76,7 +77,7 @@ static bool mips_cpu_has_work(CPUState *cs)
* 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;
}
@@ -86,7 +87,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 2b7d680547..e9b7a9f2ad 100644
--- a/target/mips/kvm.c
+++ b/target/mips/kvm.c
@@ -141,7 +141,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
- [PATCH v8 43/74] i386/whpx-all: convert to cpu_interrupt_request, (continued)
- [PATCH v8 43/74] i386/whpx-all: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 40/74] i386: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 46/74] sh4: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 41/74] i386/kvm: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 42/74] i386/hax-all: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 48/74] hppa: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 49/74] lm32: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 45/74] ppc: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 47/74] cris: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 50/74] m68k: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 51/74] mips: convert to cpu_interrupt_request,
Robert Foley <=
- [PATCH v8 52/74] nios: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 53/74] s390x: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 54/74] alpha: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 55/74] moxie: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 57/74] openrisc: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 58/74] unicore32: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 56/74] sparc: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 59/74] microblaze: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 60/74] accel/tcg: convert to cpu_interrupt_request, Robert Foley, 2020/03/26
- [PATCH v8 44/74] i386/hvf: convert to cpu_request_interrupt, Robert Foley, 2020/03/26