devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Timur Tabi <timur@codeaurora.org>
To: Al Stone <al.stone@linaro.org>,
	Guenter Roeck <linux@roeck-us.net>, Fu Wei <fu.wei@linaro.org>
Cc: Pratyush Anand <panand@redhat.com>,
	devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org,
	Arnd Bergmann <arnd@arndb.de>,
	linux-doc@vger.kernel.org, Jon Masters <jcm@redhat.com>,
	Linaro ACPI Mailman List <linaro-acpi@lists.linaro.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	lkml <linux-kernel@vger.kernel.org>,
	Will Deacon <will.deacon@arm.com>,
	Wim Van Sebroeck <wim@iguana.be>,
	Rob Herring <robherring2@gmail.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Wei Fu <tekkamanninja@gmail.com>,
	Jonathan Corbet <corbet@lwn.net>, Dave Young <dyoung@redhat.com>,
	Vipul Gandhi <vgandhi@codeaurora.org>
Subject: Re: [Linaro-acpi] [PATCH v8 5/5] Watchdog: introduce ARM SBSA watchdog driver
Date: Thu, 12 Nov 2015 18:23:52 -0600	[thread overview]
Message-ID: <56452D98.80704@codeaurora.org> (raw)
In-Reply-To: <56452970.4070209@linaro.org>

On 11/12/2015 06:06 PM, Al Stone wrote:
> If it is a NAK, that's fine, but I also want to be sure I understand what the
> objections are.  Based on my understanding of the discussion so far over the
> multiple versions, I think the primary objection is that the use of pretimeout
> makes this driver too complex, and indeed complex enough that there is some
> concern that it could destabilize a running system.  Do I have that right?

I don't have a problem with the concept of pre-timeout per se.  My 
primary objection is this code:

 > +static irqreturn_t sbsa_gwdt_interrupt(int irq, void *dev_id)
 > +{
 > +       struct sbsa_gwdt *gwdt = (struct sbsa_gwdt *)dev_id;
 > +       struct watchdog_device *wdd = &gwdt->wdd;
 > +
 > +       /* We don't use pretimeout, trigger WS1 now */
 > +       if (!wdd->pretimeout)
 > +               sbsa_gwdt_set_wcv(wdd, 0);

This driver depends on an interrupt handler in order to properly program 
the hardware.  Unlike some other devices, the SBSA watchdog does not 
need assistance to reset on a timeout -- it is a "fire and forget" 
device.  What happens if there is a hard lockup, and interrupts no 
longer work?

The reason why Fu does this is because he wants to support a pre-timeout 
value that's independent of the timeout value.  The SBSA watchdog is 
normally programmed where real timeout equals twice the pre-timeout.  I 
would prefer that the driver adhere to this limitation.  That would 
eliminate the need to pre-program the hardware in the interrupt handler.

> And finally, a simpler, single stage timeout watchdog driver would be a
> reasonable thing to accept, yes?  I can see where that would make sense.

I would be okay with merging such a driver, and then enhancing it later 
to add pre-timeout support.

> The issue for me in that case is that the SBSA requires a two stage timeout,
> so a single stage driver has no real value for me.

There are plenty of existing watchdog devices that have a two-stage 
timeout but the driver treats it as a single stage.  The PowerPC 
watchdog driver is like that.  The hardware is programmed for the second 
stage to cause a hardware reset, and the interrupt handler is typically 
a no-op or just a printk().

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.

  reply	other threads:[~2015-11-13  0:23 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 16:06 [PATCH v8 0/5] Watchdog: introduce ARM SBSA watchdog driver fu.wei
2015-10-27 16:06 ` [PATCH v8 1/5] Documentation: add sbsa-gwdt driver documentation fu.wei
     [not found]   ` <1445961999-9506-2-git-send-email-fu.wei-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-27 16:22     ` Mark Rutland
2015-10-28  4:10       ` Fu Wei
     [not found]         ` <CADyBb7sAcT4bXrkNo2GKx1Tw5wOuf8JeMgCoiAw=owHqvYx6ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-30 17:46           ` Timur Tabi
2015-10-30 18:35             ` Fu Wei
     [not found]               ` <CADyBb7sPqsoQdYBUpHY2HvZ+iT7ABa9NoCX7Jax1NKugYOy1zQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-30 18:53                 ` Timur Tabi
2015-10-30 19:05                   ` Mark Rutland
2015-10-30 20:37                     ` Timur Tabi
     [not found]                       ` <5633D514.4060102-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-11-02  4:10                         ` Fu Wei
2015-11-02  4:03                     ` Fu Wei
     [not found]                       ` <CADyBb7sjZ-XcPkGqtD4Dq-V5CmXY1dSBf7RiC7VLunMBrdMvMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-02  4:06                         ` Timur Tabi
2015-11-02  4:23                           ` Jon Masters
2015-10-27 16:06 ` [PATCH v8 2/5] ARM64: add SBSA Generic Watchdog device node in foundation-v8.dts fu.wei
2015-10-27 16:06 ` [PATCH v8 3/5] ARM64: add SBSA Generic Watchdog device node in amd-seattle-soc.dtsi fu.wei
2015-10-27 16:06 ` [PATCH v8 4/5] Watchdog: introdouce "pretimeout" into framework fu.wei
2015-10-27 16:06 ` [PATCH v8 5/5] Watchdog: introduce ARM SBSA watchdog driver fu.wei
2015-11-05  1:59   ` [Linaro-acpi] " Timur Tabi
2015-11-05  5:13     ` Guenter Roeck
2015-11-05 11:58       ` Fu Wei
     [not found]         ` <CADyBb7tTf0Jz0sgKecSn-LgMEUMdueTb5Uxq_e5t39byOsJQEQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-05 13:47           ` Timur Tabi
2015-11-05 13:47       ` Timur Tabi
     [not found]         ` <563B5DF9.6080102-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-11-05 14:03           ` Fu Wei
2015-11-05 14:08             ` Timur Tabi
2015-11-05 14:35               ` Fu Wei
2015-11-05 14:40                 ` Timur Tabi
2015-11-05 15:00                   ` Fu Wei
2015-11-05 16:41                     ` Guenter Roeck
2015-11-05 17:58                       ` Fu Wei
2015-11-05 17:59                       ` Timur Tabi
2015-11-05 18:04                         ` Fu Wei
2015-11-13  0:06                       ` Al Stone
2015-11-13  0:23                         ` Timur Tabi [this message]
2015-11-19 23:50                           ` Al Stone
     [not found]                         ` <56452970.4070209-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-11-13  0:25                           ` Guenter Roeck
     [not found]                             ` <56452E10.5060705-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2015-11-20  0:11                               ` Al Stone
2015-11-20  0:26                                 ` Timur Tabi

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=56452D98.80704@codeaurora.org \
    --to=timur@codeaurora.org \
    --cc=al.stone@linaro.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dyoung@redhat.com \
    --cc=fu.wei@linaro.org \
    --cc=jcm@redhat.com \
    --cc=linaro-acpi@lists.linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=panand@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=robherring2@gmail.com \
    --cc=tekkamanninja@gmail.com \
    --cc=vgandhi@codeaurora.org \
    --cc=will.deacon@arm.com \
    --cc=wim@iguana.be \
    /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 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).