From patchwork Tue Feb 27 13:32:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 776232 Delivered-To: patch@linaro.org Received: by 2002:adf:a113:0:b0:33d:f458:43ce with SMTP id o19csp160881wro; Tue, 27 Feb 2024 05:46:17 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVn76BaQ8jqWj/Sq8Ea6Ubo9SAkB6EpKJLDIvijo45QBj/pNT/MY+WKYn3rWGyt+nalA1JApJAs9pqChtgsmQoZ X-Google-Smtp-Source: AGHT+IEtjy8c5l78cpTpukQNeNENaSAyMT2T3p+li55CEsZ3ogrA4P06id/JexKo1h1u9lF/YLiJ X-Received: by 2002:adf:eb4f:0:b0:33d:ca5d:e082 with SMTP id u15-20020adfeb4f000000b0033dca5de082mr5300267wrn.35.1709041577511; Tue, 27 Feb 2024 05:46:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709041577; cv=none; d=google.com; s=arc-20160816; b=TC0WPIvwEkkuR429bXnm+Lpf1/fT7t+4VImK/SeWdRiZHRLJplD7k8JO7xiC2uVn5u YfFsjLgjhRXS9zOT3OwaxEH+FL2SvIiOnKlIET9gTcFhszYCYHml5hp8VnZbe07CUQ5p hnl87qJG8QOc2uXcyDWbjexa24F5fDZdBRGbR0lkjcuqLdz+/YDblZsyHy/DBLQJ0TSd abt5zYEKzgjfP8F+7Sn2+ya6Z20vIUPbkzN4q1JFLvM/ZzFJrW7C9caHPaV4nPdk/zqo XyqMRU+pXVev9xQ0d8qTnDLFuGLA2BnuS0Ltrip9l+TTlF2qzg5nZIGG5bzWViYaB1xd Lc0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=PUYripAJz/Vt0PNsUQO402Dv2ocPrItdLSWvRd1GdNE=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=tVAW5/i9E15/0+4xEqJSE/AN5qh4F+GMqjEjITtsYTerJfqIEuB6tFOpXJwOR19Ujw FYmQtBXOloZ17W8bwGRUP6t85jUwSuXkvex76k4zYYbQ7bfJA1W9ALNFIIGZ+evUyQBP EB+CG+Px07eYAcXuBpW5zgxYLDly3tDEBGljHIv1C5wg+S1PYgiOqakbEa6EOh74hxNA OX5xBJ/Frf/gd67yWRB5b1+R4YNQaSLiQfhABljVJRM1rv7OHnBZyexdiEGJFeOKhPsS aaRXr7NrXgsSeWHf1zER6IO3X+zHJfw+NyW9ooqmn2zwStmzwFlAT/AFlM12uczGzWnP 1lbA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cwGCi443; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bf3-20020a0560001cc300b0033b7b5a78cbsi3867661wrb.925.2024.02.27.05.46.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Feb 2024 05:46:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cwGCi443; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rexax-00015N-Ff; Tue, 27 Feb 2024 08:34:07 -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 1rexaG-0000hv-CN for qemu-devel@nongnu.org; Tue, 27 Feb 2024 08:33:24 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rexaE-0002py-5F for qemu-devel@nongnu.org; Tue, 27 Feb 2024 08:33:24 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-33d18931a94so3296056f8f.1 for ; Tue, 27 Feb 2024 05:33:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709040798; x=1709645598; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PUYripAJz/Vt0PNsUQO402Dv2ocPrItdLSWvRd1GdNE=; b=cwGCi443ily7XVIVWp59KAq7nRcAzmQM+FccY0XWArin7gBExrRdBFPpILhY/w2wbe VV09vcppShog/HGQ+EXVaemyYprhK2zHvCMwqsTNtP3cOwyj+G3iyGynvyHQZwmCfMxN kssTdPKDF0qoUh0aOpIdUk/TEOEF3PJOpcM9+qR56qUouZJWWxQI3Lp9bD5uQr1IbN21 r1sN1Amxa84gb8tQD8a5w5fNVj9dKuayL5PIegi5HHbJAbc/ahGh8JRunekrSZe3GN6Y WALq/AM/Ch98/xbnFWI6+or6S59B19kXoayuY0jYosYmPe3sWk19SCLG9wcPF//oOtWf BCGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709040798; x=1709645598; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PUYripAJz/Vt0PNsUQO402Dv2ocPrItdLSWvRd1GdNE=; b=oKMDklf1nkfjEmNVit25xkTQ+mm2ZVNdgIvrOENjiEiwkQHNxeNjcS4RFCQv4ROxqG Xot8CS1YH/DxIsWqd88FMz1PVc66HwqC0SOScQ8GYCzoBPmJPJ5BXDAvJy1A0GAbIiCr 8hij5gb1NiYNHj3RqH71Bv/o+Ofqcu+QZGfl5pSMlWNNJuvd61JWO0+oyTEp6WxrmGys F3XcC4Zg9cBtZnZ43Qvnqb5nkgfmbvqcY6S2wW9ihR3iCJVpcY1/WGyyOB4sCFAR/pM5 eSYTSiLrordvF+HLtR/yyT3LEZrO4RO3C97IO5V7D2IJf5Um4qaLN0VIO5oorlyZTe1v urZg== X-Gm-Message-State: AOJu0YzdmByJFkz8qimY5urp5vzv3RI5smeNGCMpzcnPivSl9aBtwj1B /Vn1kLxLdEgjoCx6x3vGHqFglQ1R+AWBsIDNER/lvC0CmDDb2y3CacorQ8n77CeWpMF9Q8BwpxA + X-Received: by 2002:adf:efc5:0:b0:33d:746b:f377 with SMTP id i5-20020adfefc5000000b0033d746bf377mr6914174wrp.45.1709040798714; Tue, 27 Feb 2024 05:33:18 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id i13-20020adfe48d000000b0033ae7d768b2sm11319552wrm.117.2024.02.27.05.33.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Feb 2024 05:33:18 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/45] misc: pxa2xx_timer: replace qemu_system_reset_request() call with watchdog_perform_action() Date: Tue, 27 Feb 2024 13:32:34 +0000 Message-Id: <20240227133314.1721857-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240227133314.1721857-1-peter.maydell@linaro.org> References: <20240227133314.1721857-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42f.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, 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Abhiram Tilak A few watchdog devices use qemu_system_reset_request(). This is not ideal since 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_request() 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 Message-id: 20240216192612.30838-5-atp.exp@gmail.com Reviewed-by: Peter Maydell Signed-off-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 6a7d5551f43..6479ab1a8b3 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" #define OSMR0 0x00 #define OSMR1 0x04 @@ -417,7 +418,7 @@ static void pxa2xx_timer_tick(void *opaque) if (t->num == 3) if (i->reset3 & 1) { i->reset3 = 0; - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + watchdog_perform_action(); } }