summaryrefslogtreecommitdiff
path: root/target-s390x/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'target-s390x/cpu.h')
-rw-r--r--target-s390x/cpu.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h
index 9be4a475a3..41b2d929cc 100644
--- a/target-s390x/cpu.h
+++ b/target-s390x/cpu.h
@@ -975,9 +975,11 @@ static inline uint64_t time2tod(uint64_t ns) {
return (ns << 9) / 125;
}
-static inline void cpu_inject_ext(CPUS390XState *env, uint32_t code, uint32_t param,
+static inline void cpu_inject_ext(S390CPU *cpu, uint32_t code, uint32_t param,
uint64_t param64)
{
+ CPUS390XState *env = &cpu->env;
+
if (env->ext_index == MAX_EXT_QUEUE - 1) {
/* ugh - can't queue anymore. Let's drop. */
return;
@@ -994,10 +996,11 @@ static inline void cpu_inject_ext(CPUS390XState *env, uint32_t code, uint32_t pa
cpu_interrupt(env, CPU_INTERRUPT_HARD);
}
-static inline void cpu_inject_io(CPUS390XState *env, uint16_t subchannel_id,
+static inline void cpu_inject_io(S390CPU *cpu, uint16_t subchannel_id,
uint16_t subchannel_number,
uint32_t io_int_parm, uint32_t io_int_word)
{
+ CPUS390XState *env = &cpu->env;
int isc = ffs(io_int_word << 2) - 1;
if (env->io_index[isc] == MAX_IO_QUEUE - 1) {
@@ -1017,8 +1020,10 @@ static inline void cpu_inject_io(CPUS390XState *env, uint16_t subchannel_id,
cpu_interrupt(env, CPU_INTERRUPT_HARD);
}
-static inline void cpu_inject_crw_mchk(CPUS390XState *env)
+static inline void cpu_inject_crw_mchk(S390CPU *cpu)
{
+ CPUS390XState *env = &cpu->env;
+
if (env->mchk_index == MAX_MCHK_QUEUE - 1) {
/* ugh - can't queue anymore. Let's drop. */
return;
@@ -1090,7 +1095,7 @@ static inline void s390_io_interrupt(S390CPU *cpu,
kvm_s390_io_interrupt(cpu, subchannel_id, subchannel_nr, io_int_parm,
io_int_word);
} else {
- cpu_inject_io(&cpu->env, subchannel_id, subchannel_nr, io_int_parm,
+ cpu_inject_io(cpu, subchannel_id, subchannel_nr, io_int_parm,
io_int_word);
}
}
@@ -1100,7 +1105,7 @@ static inline void s390_crw_mchk(S390CPU *cpu)
if (kvm_enabled()) {
kvm_s390_crw_mchk(cpu);
} else {
- cpu_inject_crw_mchk(&cpu->env);
+ cpu_inject_crw_mchk(cpu);
}
}