From nobody Tue Feb 10 20:09:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 163031928046091.20084433647651; Mon, 30 Aug 2021 03:28:00 -0700 (PDT) Received: from localhost ([::1]:52260 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mKeWF-0000Cz-Ek for importer@patchew.org; Mon, 30 Aug 2021 06:27:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKeU6-0005l2-8N for qemu-devel@nongnu.org; Mon, 30 Aug 2021 06:25:46 -0400 Received: from mail.ilande.co.uk ([2001:41c9:1:41f::167]:53316 helo=mail.default.ilande.bv.iomart.io) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mKeU2-0007LB-SG for qemu-devel@nongnu.org; Mon, 30 Aug 2021 06:25:45 -0400 Received: from host86-179-186-93.range86-179.btcentralplus.com ([86.179.186.93] helo=kentang.home) by mail.default.ilande.bv.iomart.io with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mKeTL-0003D2-Su; Mon, 30 Aug 2021 11:25:04 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, laurent@vivier.eu Date: Mon, 30 Aug 2021 11:24:41 +0100 Message-Id: <20210830102447.10806-7-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210830102447.10806-1-mark.cave-ayland@ilande.co.uk> References: <20210830102447.10806-1-mark.cave-ayland@ilande.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 86.179.186.93 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk Subject: [PATCH 06/12] mac_via: move q800 VIA1 timer variables to q800 VIA1 VMStateDescription X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.bv.iomart.io) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2001:41c9:1:41f::167; envelope-from=mark.cave-ayland@ilande.co.uk; helo=mail.default.ilande.bv.iomart.io X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZM-MESSAGEID: 1630319281922100007 Content-Type: text/plain; charset="utf-8" These variables are already present in MOS6522Q800VIA1State and so it is ju= st the VMStateDescription move that is needed. With this change the mac_via VMStateDescription is now empty and can be rem= oved completely. Signed-off-by: Mark Cave-Ayland Reviewed-by: Laurent Vivier --- hw/misc/mac_via.c | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/hw/misc/mac_via.c b/hw/misc/mac_via.c index b4a65480fd..47e221dd88 100644 --- a/hw/misc/mac_via.c +++ b/hw/misc/mac_via.c @@ -1067,27 +1067,12 @@ static int via1_post_load(void *opaque, int version= _id) return 0; } =20 -static const VMStateDescription vmstate_mac_via =3D { - .name =3D "mac-via", - .version_id =3D 2, - .minimum_version_id =3D 2, - .fields =3D (VMStateField[]) { - /* VIAs */ - VMSTATE_TIMER_PTR(mos6522_via1.one_second_timer, MacVIAState), - VMSTATE_INT64(mos6522_via1.next_second, MacVIAState), - VMSTATE_TIMER_PTR(mos6522_via1.sixty_hz_timer, MacVIAState), - VMSTATE_INT64(mos6522_via1.next_sixty_hz, MacVIAState), - VMSTATE_END_OF_LIST() - } -}; - static void mac_via_class_init(ObjectClass *oc, void *data) { DeviceClass *dc =3D DEVICE_CLASS(oc); =20 dc->realize =3D mac_via_realize; dc->reset =3D mac_via_reset; - dc->vmsd =3D &vmstate_mac_via; } =20 static TypeInfo mac_via_info =3D { @@ -1150,6 +1135,11 @@ static const VMStateDescription vmstate_q800_via1 = =3D { VMSTATE_BUFFER(adb_data_in, MOS6522Q800VIA1State), VMSTATE_BUFFER(adb_data_out, MOS6522Q800VIA1State), VMSTATE_UINT8(adb_autopoll_cmd, MOS6522Q800VIA1State), + /* Timers */ + VMSTATE_TIMER_PTR(one_second_timer, MOS6522Q800VIA1State), + VMSTATE_INT64(next_second, MOS6522Q800VIA1State), + VMSTATE_TIMER_PTR(sixty_hz_timer, MOS6522Q800VIA1State), + VMSTATE_INT64(next_sixty_hz, MOS6522Q800VIA1State), VMSTATE_END_OF_LIST() } }; --=20 2.20.1