Commit b8ba6799 authored by Andreas Färber's avatar Andreas Färber
Browse files

target-s390x: Update s390x_{tod,cpu}_timer() to use S390CPU



In place of CPUS390XState pass S390CPU as opaque from the new initfn.
cpu_interrupt() is anticipated to take a CPUState in the future.

Signed-off-by: default avatarAndreas Färber <afaerber@suse.de>
Tested-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
parent 8f22e0df
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -60,8 +60,8 @@ static void s390_cpu_initfn(Object *obj)
    env->tod_offset = TOD_UNIX_EPOCH +
                      (time2tod(mktimegm(&tm)) * 1000000000ULL);
    env->tod_basetime = 0;
    env->tod_timer = qemu_new_timer_ns(vm_clock, s390x_tod_timer, env);
    env->cpu_timer = qemu_new_timer_ns(vm_clock, s390x_cpu_timer, env);
    env->tod_timer = qemu_new_timer_ns(vm_clock, s390x_tod_timer, cpu);
    env->cpu_timer = qemu_new_timer_ns(vm_clock, s390x_cpu_timer, cpu);
#endif
    env->cpu_num = cpu_num++;
    env->ext_index = -1;
+4 −2
Original line number Diff line number Diff line
@@ -53,7 +53,8 @@
#ifndef CONFIG_USER_ONLY
void s390x_tod_timer(void *opaque)
{
    CPUS390XState *env = opaque;
    S390CPU *cpu = opaque;
    CPUS390XState *env = &cpu->env;

    env->pending_int |= INTERRUPT_TOD;
    cpu_interrupt(env, CPU_INTERRUPT_HARD);
@@ -61,7 +62,8 @@ void s390x_tod_timer(void *opaque)

void s390x_cpu_timer(void *opaque)
{
    CPUS390XState *env = opaque;
    S390CPU *cpu = opaque;
    CPUS390XState *env = &cpu->env;

    env->pending_int |= INTERRUPT_CPUTIMER;
    cpu_interrupt(env, CPU_INTERRUPT_HARD);