[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PULL 07/15] s390x/tcg: drop tod_basetime
From: |
Cornelia Huck |
Subject: |
[qemu-s390x] [PULL 07/15] s390x/tcg: drop tod_basetime |
Date: |
Mon, 2 Jul 2018 13:17:29 +0200 |
From: David Hildenbrand <address@hidden>
Never set to anything but 0.
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/cpu.c | 1 -
target/s390x/cpu.h | 1 -
target/s390x/misc_helper.c | 4 ++--
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 03ea6eafa7..a41b3f34ab 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -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);
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index ac51c17fb4..4abfe88a3d 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -131,7 +131,6 @@ struct CPUS390XState {
#endif
uint64_t tod_offset;
- uint64_t tod_basetime;
QEMUTimer *tod_timer;
QEMUTimer *cpu_timer;
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index de1ced2082..dd5273949b 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -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 */
--
2.14.4
- [qemu-s390x] [PULL 00/15] s390x patches for 3.0, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 01/15] s390/ipl: fix ipl with -no-reboot, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 02/15] loader: Check access size when calling rom_ptr() to avoid crashes, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 03/15] s390x/cpumodel: default enable bpb and ppa15 for z196 and later, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 04/15] s390x/tcg: avoid overflows in time2tod/tod2time, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 05/15] s390x/kvm: pass values instead of pointers to kvm_s390_set_clock_*(), Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 07/15] s390x/tcg: drop tod_basetime,
Cornelia Huck <=
- [qemu-s390x] [PULL 09/15] s390x/tcg: SET CLOCK COMPARATOR can clear CKC interrupts, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 08/15] s390x/tcg: properly implement the TOD, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 06/15] s390x/tod: factor out TOD into separate device, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 11/15] s390x/tcg: rearm the CKC timer during migration, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 13/15] s390x/kvm: legacy_s390_alloc() only supports one allocation, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 10/15] s390x/tcg: implement SET CLOCK, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 12/15] s390x/tcg: fix CPU hotplug with single-threaded TCG, Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 14/15] s390x/kvm: indicate alignment in legacy_s390_alloc(), Cornelia Huck, 2018/07/02
- [qemu-s390x] [PULL 15/15] s390x/tcg: fix locking problem with tcg_s390_tod_updated, Cornelia Huck, 2018/07/02
- Re: [qemu-s390x] [PULL 00/15] s390x patches for 3.0, Peter Maydell, 2018/07/02