All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Eric Auger <eauger@redhat.com>
Cc: qemu-devel@nongnu.org, mst@redhat.com, anisinha@redhat.com,
	pbonzini@redhat.com, peter.maydell@linaro.org,
	shannon.zhaosl@gmail.com, philmd@linaro.org, zhao1.liu@intel.com,
	rad@semihalf.com, leif.lindholm@oss.qualcomm.com,
	qemu-arm@nongnu.org
Subject: Re: [PATCH v2 10/21] arm: sbsa_gwdt: add 'wdat' option
Date: Wed, 27 May 2026 14:55:34 +0200	[thread overview]
Message-ID: <20260527145534.7e96da78@imammedo> (raw)
In-Reply-To: <e443a026-3511-46f5-809a-7555789d330c@redhat.com>

On Tue, 26 May 2026 16:24:59 +0200
Eric Auger <eauger@redhat.com> wrote:

> On 3/3/26 10:25 AM, Igor Mammedov wrote:
> > it will be used by arm/virt board, to pick WDAT compatible watchdog impl.
> > and act as switch over to WDAT ACPI table vesus default GTDT ACPI table.
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> >  include/hw/watchdog/sbsa_gwdt.h | 1 +
> >  hw/watchdog/sbsa_gwdt.c         | 8 ++++++++
> >  2 files changed, 9 insertions(+)
> > 
> > diff --git a/include/hw/watchdog/sbsa_gwdt.h b/include/hw/watchdog/sbsa_gwdt.h
> > index 307a4f291a..dc77e6be60 100644
> > --- a/include/hw/watchdog/sbsa_gwdt.h
> > +++ b/include/hw/watchdog/sbsa_gwdt.h
> > @@ -73,6 +73,7 @@ typedef struct SBSA_GWDTState {
> >      uint32_t woru;
> >      uint32_t wcvl;
> >      uint32_t wcvu;
> > +    bool wdat;
> >  } SBSA_GWDTState;
> >  
> >  #endif /* WDT_SBSA_GWDT_H */
> > diff --git a/hw/watchdog/sbsa_gwdt.c b/hw/watchdog/sbsa_gwdt.c
> > index c4dd8005b7..40d80f7f2b 100644
> > --- a/hw/watchdog/sbsa_gwdt.c
> > +++ b/hw/watchdog/sbsa_gwdt.c
> > @@ -265,6 +265,13 @@ static void wdt_sbsa_gwdt_realize(DeviceState *dev, Error **errp)
> >  
> >      sysbus_init_irq(sbd, &s->irq);
> >  
> > +    /*
> > +     * WDAT supports only upto 1KHz resolution,
> > +     */
> > +    if (s->wdat) {
> > +        s->freq = 1000;  
> where is it specified in the spec?

next patch has link to WDAT spec and
comment around relevant field:

+    /*
+     * WDAT spec suports only 1KHz or more coarse watchdog timer,
+     * Set resolution to minimum supported 1ms.
+     * Before starting watchdog Windows set countdown value to 5min.
+     */
+    g_assert(freq <= 1000);
+    build_append_int_noprefix(table_data, 1, 4);/* Timer Period, ms */

it's the hack to make gwdt usable for wdat and is applied only when
wdat is enabled, if not the gwdt is instantiated with native 1G and
provides corresponding fdt.

> 
> Thanks
> 
> Eric
> 
> > +    }
> > +
> >      s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, sbsa_gwdt_timer_sysinterrupt,
> >                  dev);
> >  }
> > @@ -276,6 +283,7 @@ static const Property wdt_sbsa_gwdt_props[] = {
> >       */
> >      DEFINE_PROP_UINT64("clock-frequency", struct SBSA_GWDTState, freq,
> >                         1000000000),
> > +    DEFINE_PROP_BOOL("wdat", struct SBSA_GWDTState, wdat, false),
> >  };
> >  
> >  static void wdt_sbsa_gwdt_class_init(ObjectClass *klass, const void *data)  
> 



  reply	other threads:[~2026-05-27 12:55 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03  9:25 [PATCH v2 00/21] Introduce ACPI watchdog for Q35 and arm/virt boards Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 01/21] acpi: add API to build WDAT instructions Igor Mammedov
2026-05-13 15:23   ` Zhao Liu
2026-05-26 14:11   ` Eric Auger
2026-03-03  9:25 ` [PATCH v2 02/21] x86: q35: add 'wdat' property Igor Mammedov
2026-05-13 14:58   ` Zhao Liu
2026-05-14  7:16     ` Ani Sinha
2026-03-03  9:25 ` [PATCH v2 03/21] x86: q35: generate WDAT ACPI table Igor Mammedov
2026-05-13 15:47   ` Zhao Liu
2026-05-13 15:28     ` Michael S. Tsirkin
2026-05-14 14:32       ` Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 04/21] tests: acpi: x86/q35: whitelist new WDAT table Igor Mammedov
2026-05-13 15:48   ` Zhao Liu
2026-03-03  9:25 ` [PATCH v2 05/21] tests: acpi: x86/q35: add WDAT table test case Igor Mammedov
2026-05-13 15:49   ` Zhao Liu
2026-03-03  9:25 ` [PATCH v2 06/21] tests: acpi: x86/q35: update expected WDAT blob Igor Mammedov
2026-05-13 15:48   ` Zhao Liu
2026-03-03  9:25 ` [PATCH v2 07/21] arm: sbsa_gwdt: fixup default "clock-frequency" Igor Mammedov
2026-05-26 14:19   ` Eric Auger
2026-06-03  6:15   ` Michael S. Tsirkin
2026-03-03  9:25 ` [PATCH v2 08/21] arm: add tracing events to sbsa_gwdt Igor Mammedov
2026-05-26 14:02   ` Eric Auger
2026-03-03  9:25 ` [PATCH v2 09/21] arm: virt: create sbsa_gwdt watchdog Igor Mammedov
2026-05-26 13:58   ` Eric Auger
2026-05-27 12:49     ` Igor Mammedov
2026-05-28  9:04       ` Eric Auger
2026-05-28  9:59         ` Eric Auger
2026-05-28 14:37           ` Igor Mammedov
2026-06-01 16:37             ` Eric Auger
2026-06-02 12:41               ` Igor Mammedov
2026-06-04 16:48   ` Eric Auger
2026-06-04 16:53     ` Eric Auger
2026-06-05 14:45     ` Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 10/21] arm: sbsa_gwdt: add 'wdat' option Igor Mammedov
2026-05-26 14:24   ` Eric Auger
2026-05-27 12:55     ` Igor Mammedov [this message]
2026-03-03  9:25 ` [PATCH v2 11/21] arm: virt: add support for WDAT based watchdog Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 12/21] tests: acpi: arm/virt: whitelist new WDAT table Igor Mammedov
2026-05-26 14:42   ` Eric Auger
2026-03-03  9:25 ` [PATCH v2 13/21] tests: acpi: arm/virt: add WDAT table test case Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 14/21] tests: acpi: arm/virt: update expected WDAT blob Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 15/21] tests: acpi: arm/virt: whitelist GTDT table Igor Mammedov
2026-05-26 14:42   ` Eric Auger
2026-03-03  9:25 ` [PATCH v2 16/21] tests: acpi: arm/virt: add GTDT watchdog table test case Igor Mammedov
2026-05-26 14:44   ` Eric Auger
2026-05-27 12:58     ` Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 17/21] tests: acpi: arm/virt: update expected GTDT blob Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 18/21] sbsa_gwdt: reduce code ident Igor Mammedov
2026-05-26 14:37   ` Eric Auger
2026-03-03  9:25 ` [PATCH v2 19/21] sbsa_gwdt: move all foo_REFRESH logic under REFRESH condition Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 20/21] sbsa_gwdt: reschedule timer on direct WCV load Igor Mammedov
2026-03-03  9:25 ` [PATCH v2 21/21] sbsa_gwdt: limit compare_value to INT64_MAX Igor Mammedov
2026-04-28 14:12 ` [PATCH v2 00/21] Introduce ACPI watchdog for Q35 and arm/virt boards Igor Mammedov
2026-05-12 13:30   ` Igor Mammedov
2026-05-12 14:45     ` Ani Sinha
2026-05-18 14:35     ` Igor Mammedov
2026-06-03  6:17 ` Michael S. Tsirkin

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=20260527145534.7e96da78@imammedo \
    --to=imammedo@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=eauger@redhat.com \
    --cc=leif.lindholm@oss.qualcomm.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rad@semihalf.com \
    --cc=shannon.zhaosl@gmail.com \
    --cc=zhao1.liu@intel.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.