[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174784258183.406.15458664313624762621.tip-bot2@tip-bot2>
Date: Wed, 21 May 2025 15:49:41 -0000
From: "tip-bot2 for Pohsun Su" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Pohsun Su <pohsuns@...dia.com>, Robert Lin <robelin@...dia.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: timers/clocksource] clocksource/drivers/timer-tegra186: Fix
watchdog self-pinging
The following commit has been merged into the timers/clocksource branch of tip:
Commit-ID: b42d781e0350c969ef8155b800e33400f5f8b8a6
Gitweb: https://git.kernel.org/tip/b42d781e0350c969ef8155b800e33400f5f8b8a6
Author: Pohsun Su <pohsuns@...dia.com>
AuthorDate: Wed, 07 May 2025 12:43:10 +08:00
Committer: Daniel Lezcano <daniel.lezcano@...aro.org>
CommitterDate: Fri, 16 May 2025 11:10:32 +02:00
clocksource/drivers/timer-tegra186: Fix watchdog self-pinging
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@...dia.com>
Signed-off-by: Robert Lin <robelin@...dia.com>
Link: https://lore.kernel.org/r/20250507044311.3751033-3-robelin@nvidia.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
---
drivers/clocksource/timer-tegra186.c | 27 +---------------------------
1 file changed, 27 deletions(-)
diff --git a/drivers/clocksource/timer-tegra186.c b/drivers/clocksource/timer-tegra186.c
index 5eb6b7e..fb8a51a 100644
--- a/drivers/clocksource/timer-tegra186.c
+++ b/drivers/clocksource/timer-tegra186.c
@@ -174,9 +174,6 @@ static void tegra186_wdt_enable(struct tegra186_wdt *wdt)
value &= ~WDTCR_PERIOD_MASK;
value |= WDTCR_PERIOD(1);
- /* enable local interrupt for WDT petting */
- value |= WDTCR_LOCAL_INT_ENABLE;
-
/* enable local FIQ and remote interrupt for debug dump */
if (0)
value |= WDTCR_REMOTE_INT_ENABLE |
@@ -427,23 +424,10 @@ static int tegra186_timer_usec_init(struct tegra186_timer *tegra)
return clocksource_register_hz(&tegra->usec, USEC_PER_SEC);
}
-static irqreturn_t tegra186_timer_irq(int irq, void *data)
-{
- struct tegra186_timer *tegra = data;
-
- if (watchdog_active(&tegra->wdt->base)) {
- tegra186_wdt_disable(tegra->wdt);
- tegra186_wdt_enable(tegra->wdt);
- }
-
- return IRQ_HANDLED;
-}
-
static int tegra186_timer_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct tegra186_timer *tegra;
- unsigned int irq;
int err;
tegra = devm_kzalloc(dev, sizeof(*tegra), GFP_KERNEL);
@@ -462,8 +446,6 @@ static int tegra186_timer_probe(struct platform_device *pdev)
if (err < 0)
return err;
- irq = err;
-
/* create a watchdog using a preconfigured timer */
tegra->wdt = tegra186_wdt_create(tegra, 0);
if (IS_ERR(tegra->wdt)) {
@@ -490,17 +472,8 @@ static int tegra186_timer_probe(struct platform_device *pdev)
goto unregister_osc;
}
- err = devm_request_irq(dev, irq, tegra186_timer_irq, 0,
- "tegra186-timer", tegra);
- if (err < 0) {
- dev_err(dev, "failed to request IRQ#%u: %d\n", irq, err);
- goto unregister_usec;
- }
-
return 0;
-unregister_usec:
- clocksource_unregister(&tegra->usec);
unregister_osc:
clocksource_unregister(&tegra->osc);
unregister_tsc:
Powered by blists - more mailing lists