[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/45] misc: m48t59: replace qemu_system_reset_request() call with
From: |
Peter Maydell |
Subject: |
[PULL 04/45] misc: m48t59: replace qemu_system_reset_request() call with watchdog_perform_action() |
Date: |
Tue, 27 Feb 2024 13:32:33 +0000 |
From: Abhiram Tilak <atp.exp@gmail.com>
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 <atp.exp@gmail.com>
Message-id: 20240216192612.30838-4-atp.exp@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
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 aa44c4b20c4..1585a2d3997 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"
#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] = 0x00;
NVRAM->buffer[0x1FFC] &= ~0x40;
- /* May it be a hw CPU Reset instead ? */
- qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
+ watchdog_perform_action();
} else {
qemu_set_irq(NVRAM->IRQ, 1);
qemu_set_irq(NVRAM->IRQ, 0);
--
2.34.1
- [PULL 00/45] target-arm queue, Peter Maydell, 2024/02/27
- [PULL 01/45] hw/arm/sbsa-ref: Simplify init since PCIe is always enabled, Peter Maydell, 2024/02/27
- [PULL 02/45] target/arm: Advertise Cortex-A53 erratum #843419 fix via REVIDR, Peter Maydell, 2024/02/27
- [PULL 03/45] MAINTAINERS: Cover hw/ide/ahci-allwinner.c with AllWinner A10 machine, Peter Maydell, 2024/02/27
- [PULL 08/45] tests/qtest: Check that EXTI fan-in irqs are correctly connected, Peter Maydell, 2024/02/27
- [PULL 10/45] block: m25p80: Add support of mt35xu02gbba, Peter Maydell, 2024/02/27
- [PULL 04/45] misc: m48t59: replace qemu_system_reset_request() call with watchdog_perform_action(),
Peter Maydell <=
- [PULL 06/45] xlnx-versal-ospi: disable reentrancy detection for iomem_dac, Peter Maydell, 2024/02/27
- [PULL 18/45] hw/core/reset: Implement qemu_register_reset via qemu_register_resettable, Peter Maydell, 2024/02/27
- [PULL 17/45] hw/core/reset: Add qemu_{register, unregister}_resettable(), Peter Maydell, 2024/02/27
- [PULL 12/45] arm/ptw: Handle atomic updates of page tables entries in MMIO during PTW., Peter Maydell, 2024/02/27
- [PULL 15/45] hw/core: Add documentation and license comments to reset.h, Peter Maydell, 2024/02/27
- [PULL 07/45] hw/arm: Use TYPE_OR_IRQ when connecting STM32L4x5 EXTI fan-in IRQs, Peter Maydell, 2024/02/27
- [PULL 11/45] arm: xlnx-versal-virt: Add machine property ospi-flash, Peter Maydell, 2024/02/27
- [PULL 13/45] system/bootdevice: Don't unregister reset handler in restore_boot_order(), Peter Maydell, 2024/02/27
- [PULL 21/45] hw/arm/bcm2836: Split out common part of BCM283X classes, Peter Maydell, 2024/02/27
- [PULL 25/45] hw/arm/bcm2838: Add GIC-400 to BCM2838 SoC, Peter Maydell, 2024/02/27