From: Guenter Roeck <linux@roeck-us.net>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Wim Van Sebroeck <wim@iguana.be>,
linux-watchdog@vger.kernel.org, Felipe Balbi <balbi@ti.com>,
Lokesh Vutla <lokeshvutla@ti.com>,
kernel@pengutronix.de, Lars Poeschel <poeschel@lemonage.de>
Subject: Re: [PATCH v2 0/4] watchdog: omap: several cleanups
Date: Fri, 31 Jul 2015 09:03:39 -0700 [thread overview]
Message-ID: <55BB9C5B.1030407@roeck-us.net> (raw)
In-Reply-To: <20150731145210.GX15360@pengutronix.de>
Hi Uwe,
On 07/31/2015 07:52 AM, Uwe Kleine-König wrote:
> Hello Guenter,
>
> On Fri, Jul 31, 2015 at 03:04:28AM -0700, Guenter Roeck wrote:
>> On 07/31/2015 02:33 AM, Uwe Kleine-König wrote:
>>> Hello,
>>>
>>> On Fri, May 22, 2015 at 12:18:10PM -0700, Guenter Roeck wrote:
>>>> On Fri, May 22, 2015 at 07:59:23PM +0200, Uwe Kleine-König wrote:
>>>>> On Fri, May 08, 2015 at 09:35:02AM +0200, Uwe Kleine-König wrote:
>>>>>> Hello,
>>>>>>
>>>>>> On Mon, Apr 27, 2015 at 11:22:57AM +0200, Uwe Kleine-König wrote:
>>>>>>> this is v2 of the series I sent on Friday. The changes to the patches
>>>>>>> are documented in the respective mails. Thanks to Felipe Balbi and
>>>>>>> Guenter Roeck for the feedback. I added Reviewed-by tags for Guenter who
>>>>>>> didn't even saw these patches up to now (but who gave a carte blanche).
>>>>>>> I assume that's ok and as intended, Guenter?
>>>>>> Patches 1 to 5 got positive feedback, Wim, do you intend to take them
>>>>>> for the next merge window?
>>>>> gentle ping!
>>>>>
>>>> The patches have been in my watchdog-next branch for a while.
>>>> I sent a pull request to Wim a minute ago, to help him decide.
>>>
>>> I didn't hear anything back since this pull request and in the meantime
>>> other patches entered, with b2102eb36e7909c779e46f66595fda75aa219f4c
>>> being conceptual similar to my patch 6. Also I think adding
>>> omap_wdt_start directly after pm_runtime_put_sync is suboptimal?!
>>>
>>
>> I see five of your patches upstream. The only one missing is patch #6,
>> which should be addressed (at least for the most part) with the patch
>> referenced above. Is there anything else missing ?
> You're right. I cannot reconstruct which command convinced me before
> that the whole series is missing. I guess PEBKAC. Thanks.
>
>> Not sure I can follow your comment regarding omap_wdt_start() and pm_runtime_put_sync().
>> Do you think the watchdog should be enabled earlier ? If so, feel free to submit
>> a patch. You'd have to be careful with pm handling, though, since omap_wdt_start()
>> calls pm_runtime_get_sync().
> I admit I'm not fluent with that runtime pm stuff. But it looks wrong to
> me to have:
>
> omap_wdt_disable(wdev);
>
> [...]
>
> pm_runtime_put_sync(wdev->dev);
>
> if (early_enable)
> omap_wdt_start(&wdev->wdog);
>
> And AFAIU pm_runtime_get and .._put are like references, so moving the
> omap_wdt_start shouldn't hurt?! The only (positive!) effect is that the
> call to pm_runtime_idle isn't done just to be reversed by
> pm_runtime_resume as triggered by pm_runtime_get_sync.
>
I would agree, but I must admit that I have no idea how the runtime code
works. What happens if pm_runtime_get_sync() is called twice ?
It seems to be doing much more than just incrementing a reference count.
If you think it is ok, feel free to submit a patch to change the call order.
There is a few other things I don't understand about the driver, such as
why it needs a separate lock "to avoid races with PM". It would be useful
to understand why this is needed and what exactly the race condition is,
because it might apply to other drivers and ask for an infrastructure
solution.
Anyway, help me remember - isn't this the chip where it is impossible
to find out if it is running or not ? If so, maybe it would make sense
to simply always enable it in probe and let the infrastructure handle
keepalives while the device is closed (I am working on a simplified version
of that infrastructure code).
Thanks,
Guenter
prev parent reply other threads:[~2015-07-31 16:03 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 9:22 [PATCH v2 0/4] watchdog: omap: several cleanups Uwe Kleine-König
2015-04-27 9:22 ` [PATCH v2 1/4] watchdog: omap: clearify device tree documentation Uwe Kleine-König
2015-04-27 9:22 ` [PATCH v2 2/4] watchdog: omap: use watchdog_init_timeout instead of open coding it Uwe Kleine-König
2015-04-27 9:23 ` [PATCH v2 3/4] watchdog: omap: put struct watchdog_device into driver data Uwe Kleine-König
2015-04-27 9:23 ` [PATCH v2 4/4] watchdog: omap: simplify assignment of bootstatus Uwe Kleine-König
2015-04-29 18:38 ` [PATCH v2 5/4] watchdog: omap: assert the counter being stopped before reprogramming Uwe Kleine-König
2015-05-01 4:53 ` Guenter Roeck
2015-04-29 18:38 ` [PATCH v2 6/4] watchdog: omap: allow to keep timer running at probe time Uwe Kleine-König
2015-04-29 18:47 ` Uwe Kleine-König
2015-05-01 4:52 ` Guenter Roeck
2015-05-05 13:53 ` Uwe Kleine-König
2015-05-08 7:35 ` [PATCH v2 0/4] watchdog: omap: several cleanups Uwe Kleine-König
2015-05-22 17:59 ` Uwe Kleine-König
2015-05-22 19:18 ` Guenter Roeck
2015-07-31 9:33 ` Uwe Kleine-König
2015-07-31 10:04 ` Guenter Roeck
2015-07-31 14:52 ` Uwe Kleine-König
2015-07-31 16:03 ` Guenter Roeck [this message]
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=55BB9C5B.1030407@roeck-us.net \
--to=linux@roeck-us.net \
--cc=balbi@ti.com \
--cc=kernel@pengutronix.de \
--cc=linux-watchdog@vger.kernel.org \
--cc=lokeshvutla@ti.com \
--cc=poeschel@lemonage.de \
--cc=u.kleine-koenig@pengutronix.de \
--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