Commit 79713893 authored by Mario Limonciello's avatar Mario Limonciello Committed by Greg Kroah-Hartman
Browse files

rtc: Add support for configuring the UIP timeout for RTC reads



commit 120931db upstream.

The UIP timeout is hardcoded to 10ms for all RTC reads, but in some
contexts this might not be enough time. Add a timeout parameter to
mc146818_get_time() and mc146818_get_time_callback().

If UIP timeout is configured by caller to be >=100 ms and a call
takes this long, log a warning.

Make all callers use 10ms to ensure no functional changes.

Cc:  <stable@vger.kernel.org> # 6.1.y
Fixes: ec5895c0 ("rtc: mc146818-lib: extract mc146818_avoid_UIP")
Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Tested-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Reviewed-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Acked-by: default avatarMateusz Jończyk <mat.jonczyk@o2.pl>
Link: https://lore.kernel.org/r/20231128053653.101798-4-mario.limonciello@amd.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fd1f5396
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment