]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
s390x/tcg: drop tod_basetime
authorDavid Hildenbrand <david@redhat.com>
Wed, 27 Jun 2018 13:44:05 +0000 (15:44 +0200)
committerCornelia Huck <cohuck@redhat.com>
Mon, 2 Jul 2018 08:37:38 +0000 (10:37 +0200)
Never set to anything but 0.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20180627134410.4901-5-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
target/s390x/cpu.c
target/s390x/cpu.h
target/s390x/misc_helper.c

index 03ea6eafa7e5d95bba988590231e4bc9ddada599..a41b3f34abb0c4f9a067da2f1ee639ac4c992ac3 100644 (file)
@@ -289,7 +289,6 @@ static void s390_cpu_initfn(Object *obj)
     qemu_get_timedate(&tm, 0);
     env->tod_offset = TOD_UNIX_EPOCH +
                       (time2tod(mktimegm(&tm)) * 1000000000ULL);
-    env->tod_basetime = 0;
     env->tod_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu);
     env->cpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu);
     s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu);
index ac51c17fb4f24a9b800a869d758e80948c3fefe0..4abfe88a3d3a316d9830b94a22ba038b6003abe0 100644 (file)
@@ -131,7 +131,6 @@ struct CPUS390XState {
 #endif
 
     uint64_t tod_offset;
-    uint64_t tod_basetime;
     QEMUTimer *tod_timer;
 
     QEMUTimer *cpu_timer;
index de1ced20826e5405b557708dad5e18e892975947..dd5273949b14a190b8ff0d0ec701c9373db989f5 100644 (file)
@@ -141,7 +141,7 @@ uint64_t HELPER(stck)(CPUS390XState *env)
     uint64_t time;
 
     time = env->tod_offset +
-        time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - env->tod_basetime);
+        time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
 
     return time;
 }
@@ -161,7 +161,7 @@ void HELPER(sckc)(CPUS390XState *env, uint64_t time)
     /* nanoseconds */
     time = tod2time(time);
 
-    timer_mod(env->tod_timer, env->tod_basetime + time);
+    timer_mod(env->tod_timer, time);
 }
 
 /* Set Tod Programmable Field */