From nobody Fri Nov 1 07:32:17 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1708091830; cv=none; d=zohomail.com; s=zohoarc; b=Khoxs9wYd5zA8VEru4JobZRL4Ril6ffHLRjwdiFx7MZctm5Obd4i7y40LkG78d4MLr7jGbosBACBnLLFxHIQCq3Qkf8DKAjKN95oqieEx821kIENLptgVIGJ/iZ14vJPBd8RwX2YLNkLuQU8OJPBAs/49bTxozN6dMrC5H7WHkE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708091830; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=POgfkVVu83Vm75+SuvVmDFMZzSx8Ahq22ouOJhX3uno=; b=jFM0WaQCFRzoY19QlOU4kuTDSg2ypvdv1mqQInIcxTd5BIsDSSlK2IXjjpkXard2nZqghFsAvJSZ6KMzoJKk91XXyEs1gE3f1SJnqn/Xfy9cYLTE2QcREV9G9F66JYKYjofHI/uDiuK8KyEY3/SHKCZCtx0Fxd4ITR3gdfFErgk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1708091830189405.5851588206183; Fri, 16 Feb 2024 05:57:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rayhi-0004yS-QG; Fri, 16 Feb 2024 08:56:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rayhh-0004yI-JZ for qemu-devel@nongnu.org; Fri, 16 Feb 2024 08:56:37 -0500 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rayhf-0003Yo-Mo for qemu-devel@nongnu.org; Fri, 16 Feb 2024 08:56:37 -0500 Received: by mail-pj1-x102a.google.com with SMTP id 98e67ed59e1d1-290ec261a61so1324361a91.0 for ; Fri, 16 Feb 2024 05:56:35 -0800 (PST) Received: from iuseotherswifi.notpua ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id gv8-20020a17090b11c800b00296e2434e7esm3382844pjb.53.2024.02.16.05.56.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 05:56:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708091793; x=1708696593; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=POgfkVVu83Vm75+SuvVmDFMZzSx8Ahq22ouOJhX3uno=; b=mWNXA0HgB+847rhzh+P1qum3fZaTzBa6N3ny4htBVED/SdEt1fdDG2fUCBZ/4DHzdc NRvvJc2pFmhv3V8/hIR8Vvhbz9vJXzXCysG7oABjx+x/GwO4Htqy+VZC4Mpsj60Yg73N w+o2el1RMO+o1WSxJHHzF5hxM7sWeiPjJhca2MAXPV8FFhJrOEJNRQwkH9OGKVOAezRW D7vruPOHMMCJhdcOD+mO+Wl6i6CHrKDS+gq1H/FZoK6DSb4H3TLboBDp3phZ3H0YHBg6 Sf1NEes2lCp0VmtS05pldIDHt6wvbaJLcppnA3ma+dR01xmRne9AmzfBRPlCXT9O75f7 NRlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708091793; x=1708696593; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=POgfkVVu83Vm75+SuvVmDFMZzSx8Ahq22ouOJhX3uno=; b=JULqUG4nJb16o1WZzivKVIkN2cHRjStctrOmNd1VNdwQwWVjSHqtEWJVwS0c12kVoS 9jkuAdBDo/sSleI8G/yHyX4OJfOyKlxSwACDsnmV8YQQ93Oxo4O3WFQyeLUXs/EKChf4 5f3LB9qec4CMlk5swaI7luWukbqDv3kGhFqnfJnK0uSj8DIjE9kMJpjxsu3xqFuJMwg7 QPLYeNWMuy54GRpdyUWk/0kQ1jPDwBfc92MUD7sRuaq20bh+Rf8x2KgkL28iXPjf/F4g 8rMKhh6StzjuQwfReVB2HWiVy+x52ERFRFee/mHclSk3Hjj+AU7+RhKLVBeM0a7WKcpW esOg== X-Gm-Message-State: AOJu0Yx2EYyT9za8dhO5RA+dHiEEygAoTlqxeKn6Ds+M91oOWYTs84Ag TM/5ELg78upxKaduV4a7iPnwPKrAw8lhz0qwecza0z2eYCIJ2xUFDZvHdS4hjTE= X-Google-Smtp-Source: AGHT+IGpbjDgJ90TwkfIlZmijpSkQXLOwcQiUKWD1Rbo9DnCXs7EKrQhu9GyiS+FDx7FNjFwe+MMtQ== X-Received: by 2002:a17:90a:f597:b0:299:2a8:55b0 with SMTP id ct23-20020a17090af59700b0029902a855b0mr5471604pjb.23.1708091793151; Fri, 16 Feb 2024 05:56:33 -0800 (PST) From: Abhiram Tilak To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, clg@kaod.org, david@gibson.dropbear.id.au, harshpb@linux.ibm.com, Abhiram Tilak Subject: [PATCH 1/3] misc: m48t59: replace qemu_system_reset_request() call with watchdog_perform_action() Date: Fri, 16 Feb 2024 19:21:37 +0530 Message-ID: <20240216135137.8668-4-atp.exp@gmail.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20240216135137.8668-3-atp.exp@gmail.com> References: <20240216135137.8668-3-atp.exp@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::102a; envelope-from=atp.exp@gmail.com; helo=mail-pj1-x102a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 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-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1708091831469100003 Content-Type: text/plain; charset="utf-8" A few watchdog devices use qemu_system_reset_request(). This is not ideal s= ince behaviour of watchdog-expiry can't be changed by QMP using `watchdog_action= `. As stated in BiteSizedTasks wiki page, instead of using qemu_system_reset_r= equest() to reset when a watchdog timer expires, let watchdog_perform_action() decide what to do. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2124 Signed-off-by: Abhiram Tilak Reviewed-by: Peter Maydell --- hw/rtc/m48t59.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rtc/m48t59.c b/hw/rtc/m48t59.c index aa44c4b20c..ebda084478 100644 --- a/hw/rtc/m48t59.c +++ b/hw/rtc/m48t59.c @@ -36,6 +36,7 @@ #include "qemu/bcd.h" #include "qemu/module.h" #include "trace.h" +#include "sysemu/watchdog.h" =20 #include "m48t59-internal.h" #include "migration/vmstate.h" @@ -163,8 +164,7 @@ static void watchdog_cb (void *opaque) if (NVRAM->buffer[0x1FF7] & 0x80) { NVRAM->buffer[0x1FF7] =3D 0x00; NVRAM->buffer[0x1FFC] &=3D ~0x40; - /* May it be a hw CPU Reset instead ? */ - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + watchdog_perform_action(); /* watchdog-expired action */ } else { qemu_set_irq(NVRAM->IRQ, 1); qemu_set_irq(NVRAM->IRQ, 0); --=20 2.42.1