diff options
author | Andreas Färber <afaerber@suse.de> | 2013-02-02 10:57:51 +0100 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-03-12 10:35:55 +0100 |
commit | 97a8ea5a3ae7938cb54fd4dc19d3a413024bc6c0 (patch) | |
tree | 6c9121e0571f75c8f5479e0027589f0d2f0178c7 /target-s390x/helper.c | |
parent | c3affe5670e5d0df8a7e06f1d6e80853633146df (diff) | |
download | qemu-97a8ea5a3ae7938cb54fd4dc19d3a413024bc6c0.zip |
cpu: Replace do_interrupt() by CPUClass::do_interrupt method
This removes a global per-target function and thus takes us one step
closer to compiling multiple targets into one executable.
It will also allow to override the interrupt handling for certain CPU
families.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-s390x/helper.c')
-rw-r--r-- | target-s390x/helper.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/target-s390x/helper.c b/target-s390x/helper.c index 2cb8dc86e3..b425054be8 100644 --- a/target-s390x/helper.c +++ b/target-s390x/helper.c @@ -86,8 +86,11 @@ S390CPU *cpu_s390x_init(const char *cpu_model) #if defined(CONFIG_USER_ONLY) -void do_interrupt(CPUS390XState *env) +void s390_cpu_do_interrupt(CPUState *cs) { + S390CPU *cpu = S390_CPU(cs); + CPUS390XState *env = &cpu->env; + env->exception_index = -1; } @@ -737,10 +740,10 @@ static void do_mchk_interrupt(CPUS390XState *env) load_psw(env, mask, addr); } -void do_interrupt(CPUS390XState *env) +void s390_cpu_do_interrupt(CPUState *cs) { - S390CPU *cpu = s390_env_get_cpu(env); - CPUState *cs; + S390CPU *cpu = S390_CPU(cs); + CPUS390XState *env = &cpu->env; qemu_log_mask(CPU_LOG_INT, "%s: %d at pc=%" PRIx64 "\n", __func__, env->exception_index, env->psw.addr); @@ -799,7 +802,6 @@ void do_interrupt(CPUS390XState *env) env->exception_index = -1; if (!env->pending_int) { - cs = CPU(s390_env_get_cpu(env)); cs->interrupt_request &= ~CPU_INTERRUPT_HARD; } } |