From nobody Tue Nov 4 18:51:47 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530530599709121.52784359749182; Mon, 2 Jul 2018 04:23:19 -0700 (PDT) Received: from localhost ([::1]:60113 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZwvM-0005mV-RP for importer@patchew.org; Mon, 02 Jul 2018 07:23:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fZwqO-00025p-2p for qemu-devel@nongnu.org; Mon, 02 Jul 2018 07:18:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fZwqM-00068C-Vq for qemu-devel@nongnu.org; Mon, 02 Jul 2018 07:18:08 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36498 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fZwqM-000684-Qj; Mon, 02 Jul 2018 07:18:06 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6E3F57C6A9; Mon, 2 Jul 2018 11:18:06 +0000 (UTC) Received: from localhost (ovpn-116-251.ams2.redhat.com [10.36.116.251]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E67E76FB; Mon, 2 Jul 2018 11:18:05 +0000 (UTC) From: Cornelia Huck To: Peter Maydell Date: Mon, 2 Jul 2018 13:17:29 +0200 Message-Id: <20180702111737.18970-8-cohuck@redhat.com> In-Reply-To: <20180702111737.18970-1-cohuck@redhat.com> References: <20180702111737.18970-1-cohuck@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 02 Jul 2018 11:18:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Mon, 02 Jul 2018 11:18:06 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PULL 07/15] s390x/tcg: drop tod_basetime X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , David Hildenbrand , Cornelia Huck , Alexander Graf , qemu-devel@nongnu.org, Christian Borntraeger , qemu-s390x@nongnu.org, Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: David Hildenbrand Never set to anything but 0. Reviewed-by: Thomas Huth Signed-off-by: David Hildenbrand Message-Id: <20180627134410.4901-5-david@redhat.com> Signed-off-by: Cornelia Huck --- 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 =3D TOD_UNIX_EPOCH + (time2tod(mktimegm(&tm)) * 1000000000ULL); - env->tod_basetime =3D 0; env->tod_timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, c= pu); env->cpu_timer =3D timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, c= pu); 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 =20 uint64_t tod_offset; - uint64_t tod_basetime; QEMUTimer *tod_timer; =20 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; =20 time =3D env->tod_offset + - time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - env->tod_basetime= ); + time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL)); =20 return time; } @@ -161,7 +161,7 @@ void HELPER(sckc)(CPUS390XState *env, uint64_t time) /* nanoseconds */ time =3D tod2time(time); =20 - timer_mod(env->tod_timer, env->tod_basetime + time); + timer_mod(env->tod_timer, time); } =20 /* Set Tod Programmable Field */ --=20 2.14.4