Re: 回复: [PATCH] watchdog: sbsa-gwdt: clamp timeout before updating wdd->timeout
From: Guenter Roeck
Date: Fri Dec 19 2025 - 10:41:09 EST
On 12/19/25 01:46, 1536943441 wrote:
Hi Guenter,
thank you for the detailed explanation.
I misunderstood the watchdog core semantics here. With max_hw_heartbeat_ms set, the userspace timeout can represent a virtual timeout and is not expected to be limited by the single hardware timeout. Given that, my change is indeed wrong
and I will drop this patch.
One follow-up question: in my testing, "/sys/class/watchdog/watchdog0/max_timeout" always shows 0 for sbsa-gwdt. Should the driver set wdd->max_timeout in probe(), or is a 0 value expected when max_hw_heartbeat_ms/virtual timeouts are used?
The value is as expected, and the driver should not do anything. A value of 0
means "unlimited", which in practice means that the limit is UINT_MAX / 1000.
Turns out the attribute is not documented. We should add it to the ABI
documentation. If/when I find the time ...
Thanks,
Guenter