From nobody Fri Nov 1 07:21: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=1708091818; cv=none; d=zohomail.com; s=zohoarc; b=bvkxr1sDIU8kZsXSXsbZx4VmWa3dww1gFc4rLIUSBP7HU0gi33S8lJyvgdfCKwCSaqMP2C5zaCTEYalYlor9WZgHnC6BzjSnolLQ9X+aCcXFkvxDqS88kHt2ClLjqSgsW0F3NinpXyB1SOXwBW5ZS48TtqYjB0cwvnDSwkbIqlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708091818; 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=1gX9IUPWPcBf9gAlly0i+hCoY3fDrVJRBiGPX7Qe8RY=; b=AQVQAly62RdyMcAkMN/kxgP4/sAwvA9aFgWPF2iB4uGGW9RJ+aB0BLzeV85oX2G6XxTryqzIj9QqRTPr/A76YY/lz4nXfFPv51am0ioxARyqC5HAdw4SCEOhnLZIuVkAgmm3BjbNvvgJu8o9uNC/XGyKJjWZVtXeMpYWUCGwm0c= 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 1708091818958454.35330493495405; Fri, 16 Feb 2024 05:56:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rayhm-00052y-IY; Fri, 16 Feb 2024 08:56:42 -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 1rayhl-00050a-2p for qemu-devel@nongnu.org; Fri, 16 Feb 2024 08:56:41 -0500 Received: from mail-pj1-x102e.google.com ([2607:f8b0:4864:20::102e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rayhj-0003ZA-EN for qemu-devel@nongnu.org; Fri, 16 Feb 2024 08:56:40 -0500 Received: by mail-pj1-x102e.google.com with SMTP id 98e67ed59e1d1-296e22229b6so476158a91.1 for ; Fri, 16 Feb 2024 05:56:39 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 05:56:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708091797; x=1708696597; 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=1gX9IUPWPcBf9gAlly0i+hCoY3fDrVJRBiGPX7Qe8RY=; b=OFS4HSQl4GXcqf2xduWQRK0y2NM90Ejm+PwBhAdWtjFmIxXUINdPetF68UBaNw0BvT AR7hCJReKEZjaUsrKgeUki5eBo3hD4KgX6S3Ul0wi5nJaSqrmaYNk2EQ5QeTY4TCb2ME XPnrvcgXXoeOZS5lPZWwe4zuwU9mMHl+JzqeuSto6J+i1Vt7bpmtxIR7NrY3L0Q13jYq A2CgeW/6qXHsY2lB1PcwhtfFpgVzmfQIiNOGqt9ZJKF6RGef41jNVU9VlBvYGJ4mRxf0 eF0b+nWBG2dxZ0Mm1Mm3CjrTqQfGLI/0RsbZ+7sWMvYZYa7IuTZRaT1F+JH4LluRyRNI ruuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708091797; x=1708696597; 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=1gX9IUPWPcBf9gAlly0i+hCoY3fDrVJRBiGPX7Qe8RY=; b=tpG5VQuHLnJDC4BU7NODeARr0uLgXoDXQnFJw3ik92NGE7gKh5sqbGhD7QpAlq9Gtk VTO9esPRYCDCKrnF5lmt15K9cgTEQBSBJlixGELw36J9AYWgbWEL8ZXmtz/Qfcpcb9c/ Eyzs4OMQ1Zxqs+15p2eGhiBKcLBXj5UOvR2pKe1/rcVhmbGT8eIWQm5Hbhmwkop2fTRr 8lr/pp/PK/FtyLkLmTES3b+oV3ebsgWZ8pziSEqaOUTEcI1KisUg0LlbrSOUin27hJQJ pN0TxQXdTeuL2VmrrEo0wL8Mew9uxDRgk3iTXfegYUAIpVfxqBBxm0uptQ1PEvhFNUin VADw== X-Gm-Message-State: AOJu0Yy9BwdvG6vi2Y0+NHnNdhYDBBwxhUSqSJX1PcePM+OOgraZwPxz EmIO8m+zYLEV2zv+3wvVw0EPj/mK88e0zly9Wb8IxAUuh8V/TjxoMrlOs/fDX80= X-Google-Smtp-Source: AGHT+IFF5RZI2telRMBNKwNibKQQtuSsKFYjTBSHKB3VRXujXyWCB+CyKHB874HsT/WOal+NnUBs7A== X-Received: by 2002:a17:90b:1953:b0:298:c81a:2395 with SMTP id nk19-20020a17090b195300b00298c81a2395mr4496568pjb.1.1708091797106; Fri, 16 Feb 2024 05:56:37 -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 2/3] misc: pxa2xx_timer: replace qemu_system_reset_request() call with watchdog_perform_action() Date: Fri, 16 Feb 2024 19:21:38 +0530 Message-ID: <20240216135137.8668-5-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::102e; envelope-from=atp.exp@gmail.com; helo=mail-pj1-x102e.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: 1708091819617100002 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/timer/pxa2xx_timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c index 6a7d5551f4..6479ab1a8b 100644 --- a/hw/timer/pxa2xx_timer.c +++ b/hw/timer/pxa2xx_timer.c @@ -18,6 +18,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qom/object.h" +#include "sysemu/watchdog.h" =20 #define OSMR0 0x00 #define OSMR1 0x04 @@ -417,7 +418,7 @@ static void pxa2xx_timer_tick(void *opaque) if (t->num =3D=3D 3) if (i->reset3 & 1) { i->reset3 =3D 0; - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + watchdog_perform_action(); } } =20 --=20 2.42.1