Re: [PATCH v3 2/7] clocksource: Add Tegra186 timers support

From: Dmitry Osipenko
Date: Fri Apr 03 2020 - 16:58:46 EST


03.04.2020 23:22, Thierry Reding ÐÐÑÐÑ:
...
> +static int tegra186_wdt_set_timeout(struct watchdog_device *wdd,
> + unsigned int timeout)
> +{
> + struct tegra186_wdt *wdt = to_tegra186_wdt(wdd);
> +
> + if (watchdog_active(&wdt->base))
> + tegra186_wdt_disable(wdt);

Could this and other tegra186_wdt_enable/disable occurrences race with
the interrupt handler?

Shouldn't IRQ be disabled/enable in a such cases to avoid the races?

> + wdt->base.timeout = timeout;
> +
> + if (watchdog_active(&wdt->base))
> + tegra186_wdt_enable(wdt);
> +
> + return 0;
> +}