From: sohailalvi2236@gmail.com Cc: qemu-devel@nongnu.org, Sohail Alvi <sohailalvi2236@gmail.com> Subject: [Qemu-devel] [PATCH 02/5] hw/timer: qemu_system_reset() replaced by watchdog_perform_action() Date: Tue, 9 Apr 2019 01:47:41 +0530 [thread overview] Message-ID: <20190408201741.8042-1-sohailalvi2236@gmail.com> (raw) In-Reply-To: <CAFEAcA-D0MK_eEs+tvPsdp+2s9YuC=qS=uyhzNtqy3DW9-=rNQ@mail.gmail.com> From: Sohail Alvi <sohailalvi2236@gmail.com> Signed-off-by: SohailAlvi <sohailalvi2236@gmail.com> The watchdog_perform_action() function has been added in place of qemu_system_reset where watchdog was triggered. Changes have been made according to the previous suggestions given by Peter Maydell. The patch was tested with scripts/checkpatch.pl and no style errors were found. --- hw/timer/etraxfs_timer.c | 3 ++- hw/timer/m48t59.c | 3 ++- hw/timer/pxa2xx_timer.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c index 2280914b1d..9561113d0e 100644 --- a/hw/timer/etraxfs_timer.c +++ b/hw/timer/etraxfs_timer.c @@ -26,6 +26,7 @@ #include "sysemu/sysemu.h" #include "qemu/timer.h" #include "hw/ptimer.h" +#include "sysemu/watchdog.h" #define D(x) @@ -207,7 +208,7 @@ static void watchdog_hit(void *opaque) qemu_irq_raise(t->nmi); } else - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + watchdog_perform_action(); t->wd_hits++; } diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index ca3ed445de..ebe58e8dc7 100644 --- a/hw/timer/m48t59.c +++ b/hw/timer/m48t59.c @@ -30,6 +30,7 @@ #include "hw/sysbus.h" #include "exec/address-spaces.h" #include "qemu/bcd.h" +#include "sysemu/watchdog.h" #include "m48t59-internal.h" @@ -158,7 +159,7 @@ static void watchdog_cb (void *opaque) 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); diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c index a489bf5159..2be680b5df 100644 --- a/hw/timer/pxa2xx_timer.c +++ b/hw/timer/pxa2xx_timer.c @@ -14,6 +14,7 @@ #include "hw/arm/pxa.h" #include "hw/sysbus.h" #include "qemu/log.h" +#include "sysemu/watchdog.h" #define OSMR0 0x00 #define OSMR1 0x04 @@ -414,7 +415,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(); } } -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: sohailalvi2236@gmail.com Cc: Sohail Alvi <sohailalvi2236@gmail.com>, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 02/5] hw/timer: qemu_system_reset() replaced by watchdog_perform_action() Date: Tue, 9 Apr 2019 01:47:41 +0530 [thread overview] Message-ID: <20190408201741.8042-1-sohailalvi2236@gmail.com> (raw) Message-ID: <20190408201741.IOD1MXFoIJIOilNO_vPccwqUHj9nEkR4dPnRhosOfP0@z> (raw) In-Reply-To: <CAFEAcA-D0MK_eEs+tvPsdp+2s9YuC=qS=uyhzNtqy3DW9-=rNQ@mail.gmail.com> From: Sohail Alvi <sohailalvi2236@gmail.com> Signed-off-by: SohailAlvi <sohailalvi2236@gmail.com> The watchdog_perform_action() function has been added in place of qemu_system_reset where watchdog was triggered. Changes have been made according to the previous suggestions given by Peter Maydell. The patch was tested with scripts/checkpatch.pl and no style errors were found. --- hw/timer/etraxfs_timer.c | 3 ++- hw/timer/m48t59.c | 3 ++- hw/timer/pxa2xx_timer.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/timer/etraxfs_timer.c b/hw/timer/etraxfs_timer.c index 2280914b1d..9561113d0e 100644 --- a/hw/timer/etraxfs_timer.c +++ b/hw/timer/etraxfs_timer.c @@ -26,6 +26,7 @@ #include "sysemu/sysemu.h" #include "qemu/timer.h" #include "hw/ptimer.h" +#include "sysemu/watchdog.h" #define D(x) @@ -207,7 +208,7 @@ static void watchdog_hit(void *opaque) qemu_irq_raise(t->nmi); } else - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + watchdog_perform_action(); t->wd_hits++; } diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c index ca3ed445de..ebe58e8dc7 100644 --- a/hw/timer/m48t59.c +++ b/hw/timer/m48t59.c @@ -30,6 +30,7 @@ #include "hw/sysbus.h" #include "exec/address-spaces.h" #include "qemu/bcd.h" +#include "sysemu/watchdog.h" #include "m48t59-internal.h" @@ -158,7 +159,7 @@ static void watchdog_cb (void *opaque) 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); diff --git a/hw/timer/pxa2xx_timer.c b/hw/timer/pxa2xx_timer.c index a489bf5159..2be680b5df 100644 --- a/hw/timer/pxa2xx_timer.c +++ b/hw/timer/pxa2xx_timer.c @@ -14,6 +14,7 @@ #include "hw/arm/pxa.h" #include "hw/sysbus.h" #include "qemu/log.h" +#include "sysemu/watchdog.h" #define OSMR0 0x00 #define OSMR1 0x04 @@ -414,7 +415,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(); } } -- 2.17.1
next prev parent reply other threads:[~2019-04-08 20:17 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-08 14:57 [Qemu-devel] [PATCH] qemu_system_reset_request() in hw/ corresponding to watchdog that has triggered replaced by watchdog_perform_action() sohailalvi2236 2019-04-08 14:57 ` sohailalvi2236 2019-04-08 15:09 ` Peter Maydell 2019-04-08 15:09 ` Peter Maydell 2019-04-08 20:17 ` sohailalvi2236 [this message] 2019-04-08 20:17 ` [Qemu-devel] [PATCH 02/5] hw/timer: qemu_system_reset() " sohailalvi2236 2019-04-08 16:59 ` [Qemu-devel] [PATCH] qemu_system_reset_request() in hw/ corresponding to watchdog that has triggered " no-reply 2019-04-08 16:59 ` no-reply
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190408201741.8042-1-sohailalvi2236@gmail.com \ --to=sohailalvi2236@gmail.com \ --cc=qemu-devel@nongnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).