summaryrefslogtreecommitdiff
path: root/include/linux/stringify.h
diff options
context:
space:
mode:
authorGopinath Sekar <[email protected]>2025-06-25 15:16:07 +0530
committerCasey Connolly <[email protected]>2026-01-14 16:17:48 +0100
commitb2446a2314310971563c0279345bbd3293614e33 (patch)
treec9bda9b7c6fa3d994747dffa398e58b46318938c /include/linux/stringify.h
parentd503633a36767d756c7de28305cf0de79440cbc0 (diff)
watchdog: qcom: Add max timeout check to prevent overflow
Added a check to ensure the requested timeout does not exceed the hardware's maximum supported value. This prevents register overflow and ensures watchdog reliability. So, added a check in qcom_wdt_start() to ensure the requested timeout does not exceed the hardware-supported maximum value. If the requested value exceeds the maximum value, then the timeout is clamped at maximum value. The timeout is first converted to watchdog ticks and then compared against QCOM_WDT_MAX_TIMEOUT. This helps prevent misconfiguration and potential watchdog misbehavior due to overflow. QCOM_WDT_MAX_TIMEOUT is set to 0xFFFFF, as Qualcomm SoCs typically use 20 bits to store bark/bite timeout values. This work builds upon the previous submission: https://lore.kernel.org/u-boot/[email protected]/ Signed-off-by: Gopinath Sekar <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Casey Connolly <[email protected]>
Diffstat (limited to 'include/linux/stringify.h')
0 files changed, 0 insertions, 0 deletions