mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pohsun Su <pohsuns@nvidia.com>
To: <thierry.reding@gmail.com>, <daniel.lezcano@linaro.org>,
	<tglx@linutronix.de>, <jonathanh@nvidia.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
	<sumitg@nvidia.com>, Pohsun Su <pohsuns@nvidia.com>
Subject: Re: [PATCH v2 2/2] clocksource/drivers/timer-tegra186: fix watchdog self-pinging.
Date: Sat, 24 Feb 2024 07:42:55 +0800	[thread overview]
Message-ID: <20240223234255.30235-1-pohsuns@nvidia.com> (raw)
In-Reply-To: <CZ96VR54894Z.TIAQI1OXCH2Z@gmail.com>

> On Fri Feb 16, 2024 at 10:02 PM CET, Pohsun Su wrote:
>> This change removes watchdog self-pinging behavior.
>>
>> The timer irq handler is triggered due to the 1st expiration,
>> the handler disables and enables watchdog but also implicitly
>> clears the expiration count so the count can only be 0 or 1.
>>
>> Since this watchdog supports opened, configured, or pinged by
>> systemd, We remove this behavior or the watchdog may not bark
>> when systemd crashes since the 5th expiration never comes.
>>
>> Signed-off-by: Pohsun Su <pohsuns@nvidia.com>
>> ---
>>  drivers/clocksource/timer-tegra186.c | 27 ++-------------------------
>>  1 file changed, 2 insertions(+), 25 deletions(-)
>>
>> diff --git a/drivers/clocksource/timer-tegra186.c b/drivers/clocksource/timer-tegra186.c
>> index 8f516366da86..acff97da138a 100644
>> --- a/drivers/clocksource/timer-tegra186.c
>> +++ b/drivers/clocksource/timer-tegra186.c
>> @@ -175,7 +175,8 @@ static void tegra186_wdt_enable(struct tegra186_wdt *wdt)
>>                value |= WDTCR_PERIOD(1);
>> 
>>                /* enable local interrupt for WDT petting */
>> -             value |= WDTCR_LOCAL_INT_ENABLE;
>> +             if (0)
>> +                     value |= WDTCR_LOCAL_INT_ENABLE;
>
> We probably shouldn't proliferate this scheme. In retrospect I should've
> removed the two other similar blocks back when I submitted the driver at
> the time since they don't really serve a purpose. The intention at the
> time was to keep them there and eventually replace the condition with
> something that could actually be toggled, but it's been almost four
> years and this hasn't happened, so I suspect that we just don't need it
> at all. So perhaps you could remove this line along with the comment in
> this patch and then add another patch that removes the other unused bits
> so that we don't carry around stuff that we just never use.
> 
> Thierry

Sure, removing both lines and the comment above.
will add another patch to clean unused bits.

Thanks!
--
Pohsun

      reply	other threads:[~2024-02-23 23:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 21:02 [PATCH v2 0/2] clocksource: fix Tegra234 SoC Watchdog Timer Pohsun Su
2024-02-16 21:02 ` [PATCH v2 1/2] clocksource/drivers/timer-tegra186: add WDIOC_GETTIMELEFT support Pohsun Su
2024-02-19 16:06   ` Thierry Reding
2024-02-23 23:51     ` Pohsun Su
2024-02-27 11:58       ` Thierry Reding
2024-02-19 16:18   ` Thierry Reding
2024-02-16 21:02 ` [PATCH v2 2/2] clocksource/drivers/timer-tegra186: fix watchdog self-pinging Pohsun Su
2024-02-19 16:17   ` Thierry Reding
2024-02-23 23:42     ` Pohsun Su [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=20240223234255.30235-1-pohsuns@nvidia.com \
    --to=pohsuns@nvidia.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=sumitg@nvidia.com \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®