lkml.org 
[lkml]   [2020]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/7] clocksource: Add Tegra186 timers support
From
Date
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;
> +}

\
 
 \ /
  Last update: 2020-04-03 22:59    [W:0.083 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site