From: Guenter Roeck <linux@roeck-us.net>
To: Wim Coekaerts <wim.coekaerts@oracle.com>
Cc: Julian Calaby <julian.calaby@gmail.com>,
wim@iguana.be, linux-watchdog@vger.kernel.org,
sparclinux <sparclinux@vger.kernel.org>
Subject: Re: [PATCH] watchdog: add sun4v_wdt device support
Date: Wed, 20 Jan 2016 15:45:54 -0800 [thread overview]
Message-ID: <20160120234554.GA21708@roeck-us.net> (raw)
In-Reply-To: <56A01612.9040901@oracle.com>
On Wed, Jan 20, 2016 at 03:19:46PM -0800, Wim Coekaerts wrote:
> On 01/20/2016 02:43 PM, Julian Calaby wrote:
> >Hi Wim Coekaerts,
> >
> >On Thu, Jan 21, 2016 at 7:30 AM, <wim.coekaerts@oracle.com> wrote:
> >>From: Wim Coekaerts <wim.coekaerts@oracle.com>
> >>
> >>This adds a simple watchdog timer for the SPARC sunv4 architecture.
> >>Export the sun4v_mach_set_watchdog() hv call, and add the target.
> >>
> >>The driver is implemented using the new watchdog api framework.
> >>
> >>Signed-off-by: Wim Coekaerts <wim.coekaerts@oracle.com>
> >This all looks _much_ better.
> thanks! :)
> >There's nothing glaringly wrong with the code like the last version,
> >so I've only got a couple of general questions:
> >
> >1. Is the platform device and driver necessary? Can't you just
> >register the watchdog device directly from sun4v_wdt_init_module()?
> >
> >2. If the platform device is unnecessary, do you still need a struct
> >watchdog_device in struct sun4v_wdt? I.e. does the watchdog core stop
> >watchdogs when you call watchdog_unregister_device()? (Or could you
> >refactor to not require it?)
> I like to be able to implement support for suspend/resume for ldoms
> as we add more support for that in the future, and support for migrating
> domains and such. So having a platform driver is useful to here as a
> framework.
>
> >3. Is it possible to get the data for sun4v_wdt_get_timeleft() by
> >calling some other sun4v_mach_*() function?
> No there is only one hv call for watchdog and that's this one.
>
> time_remaining is the time that was left until the timer was going
> to expire when making the call so it's not useful for the future time.
>
> And you can't just make a call to get time_remaining except to reset
> the timer or disable it along with it. quantum physics timer :)
>
I'll comment on the rest of the driver separately. However, since get_timeleft()
was brought up - the idea here is to report the time left as reported from the
hardware, not the time left calculated by software. If we want to calculate
the time left until expiry in software, it should be done in the watchdog core.
It should not be done in drivers.
Thanks,
Guenter
next prev parent reply other threads:[~2016-01-20 23:45 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-20 20:30 [PATCH] watchdog: add sun4v_wdt device support wim.coekaerts
2016-01-20 22:43 ` Julian Calaby
2016-01-20 23:19 ` Wim Coekaerts
2016-01-20 23:40 ` Julian Calaby
2016-01-20 23:45 ` Guenter Roeck [this message]
2016-01-21 1:35 ` Wim Coekaerts
2016-01-21 2:23 ` Julian Calaby
2016-01-21 2:36 ` Wim Coekaerts
2016-01-21 2:41 ` Julian Calaby
2016-01-20 23:37 ` Wim Coekaerts
-- strict thread matches above, loose matches on Subject: below --
2016-01-21 16:34 Guenter Roeck
2016-01-22 19:06 ` Wim Coekaerts
2016-01-12 23:10 wim.coekaerts
2016-01-13 0:06 ` Julian Calaby
2016-01-13 1:12 ` Guenter Roeck
2016-01-14 16:27 ` Wim Coekaerts
2016-01-15 20:21 ` David Miller
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=20160120234554.GA21708@roeck-us.net \
--to=linux@roeck-us.net \
--cc=julian.calaby@gmail.com \
--cc=linux-watchdog@vger.kernel.org \
--cc=sparclinux@vger.kernel.org \
--cc=wim.coekaerts@oracle.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).