From nobody Tue Nov 4 21:57:05 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; dkim=fail; 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=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1530815017164451.8287263857695; Thu, 5 Jul 2018 11:23:37 -0700 (PDT) Received: from localhost ([::1]:54282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb8um-0006Q4-Au for importer@patchew.org; Thu, 05 Jul 2018 14:23:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57955) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fb8rd-0004Kb-Ne for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:20:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fb8rc-0006Ae-HW for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:20:21 -0400 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]:34135) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fb8rc-0006AG-AN for qemu-devel@nongnu.org; Thu, 05 Jul 2018 14:20:20 -0400 Received: by mail-pf0-x242.google.com with SMTP id e10-v6so6140225pfn.1 for ; Thu, 05 Jul 2018 11:20:20 -0700 (PDT) Received: from localhost.localdomain (c-73-158-53-43.hsd1.ca.comcast.net. [73.158.53.43]) by smtp.gmail.com with ESMTPSA id g75-v6sm14170847pfg.145.2018.07.05.11.20.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 11:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h2M/LILLsTJWtZB44AupVuWRaY0gzC89PWfmj6Eib/A=; b=TP7Z/16uYgn7tD95RZ+kNw3M5rweXnOrrSQ0RjLUT3JFjZ5djIWU8xYEpN8pf/7cpq UGC7PugiFK4ydsmiC5nNO3UwiehEtU5Mx5MmRlWghB6MIJRNSCxisQiv85sSPu0W/SPQ BZgNZT7Xdz6WqKliJDJLxjQQuuNzPgv8a8mDxlmUsNYskf73XFjxdUqkqrMv8Wcip/7u 9FjN7W1CRcgSRTdicRPKdSKPOkCLjg+I7YfneCEcP8nYzcjqd3oCSjZgLFa6ApwFx1B3 MwL9z5gIkyxc5+OzdKzkFImiJV6H/ojUGUpvbr3LqMfeTOFzKjO7fnRpttelMjEQRD8y z1KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h2M/LILLsTJWtZB44AupVuWRaY0gzC89PWfmj6Eib/A=; b=gSEWTlHWbvOZKqBIjSfxlOUeNACCjVBHrNb5NiPJKw90tiUXLDDkgSyFntAxlPOkNp PfrWXYt+W8iUL4wxekIf7MUjKhw1k3FetDKD/csX0A8d3nGBvazuYTn3gk1sfStrBx3p iQnlEZzsRxayjzH8Yf1Y+eqFovgwchlak9iqQ+UKOAH/nWcTKY/SgTEC1gXZ1xfiyCph Bje6uLlZTEGJsTQcrqE2t+1Gnj4sECtsXpJGRJPee/mhNtmZSMeor81Xtpk6Vp0Ni33E jtxp4iDwrHhII5qN/M1qfDPFuhJst9TIyZ8Woj7ODqBFpVbblB8l57GPmtGcZ66gFNF5 CRvg== X-Gm-Message-State: APt69E0OE70JdA9ZuJlURtBOc7VPrHt2Vd1oqgcVnsazlKFAnxY+2xJA jiWLhbmCMS7iUrxfFGeG4Ej05g== X-Google-Smtp-Source: AAOMgpfMsPITqOXJm0+ySobHVivMc4paHIFvrSMHFGh1dHSClqObDRpBMthIB8MhXEe1m257uuHMsA== X-Received: by 2002:a65:4005:: with SMTP id f5-v6mr6357931pgp.302.1530814819399; Thu, 05 Jul 2018 11:20:19 -0700 (PDT) From: Michael Davidsaver To: Peter Maydell , Paolo Bonzini Date: Thu, 5 Jul 2018 11:19:50 -0700 Message-Id: <20180705182001.16537-4-mdavidsaver@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180705182001.16537-1-mdavidsaver@gmail.com> References: <20180705182001.16537-1-mdavidsaver@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::242 Subject: [Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection 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: Antoine Mathys , Thomas Huth , Michael Davidsaver , qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Need to save HOUR[HOUR12] bit to keep track of guest selection of 12-hour mode. Write through current time registers to achieve this. Will be overwritten by the next read/latch. This was only being done in two of three arms of this conditional block. Signed-off-by: Michael Davidsaver Reviewed-by: David Gibson --- hw/timer/ds1338.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/timer/ds1338.c b/hw/timer/ds1338.c index 7298c5af43..b56db5852e 100644 --- a/hw/timer/ds1338.c +++ b/hw/timer/ds1338.c @@ -220,10 +220,8 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data) value unchanged. */ data =3D (data & ~CTRL_OSF) | (data & s->nvram[s->ptr] & CTRL_OSF); =20 - s->nvram[s->ptr] =3D data; - } else { - s->nvram[s->ptr] =3D data; } + s->nvram[s->ptr] =3D data; inc_regptr(s); return 0; } --=20 2.11.0