OpenCloudOS-Kernel/drivers/base/power
Mario Limonciello 49a76c08bc rtc: Extend timeout for waiting for UIP to clear to 1s
commit cef9ecc8e938dd48a560f7dd9be1246359248d20 upstream.

Specs don't say anything about UIP being cleared within 10ms. They
only say that UIP won't occur for another 244uS. If a long NMI occurs
while UIP is still updating it might not be possible to get valid
data in 10ms.

This has been observed in the wild that around s2idle some calls can
take up to 480ms before UIP is clear.

Adjust callers from outside an interrupt context to wait for up to a
1s instead of 10ms.

Cc:  <stable@vger.kernel.org> # 6.1.y
Fixes: ec5895c0f2 ("rtc: mc146818-lib: extract mc146818_avoid_UIP")
Reported-by: Carsten Hatger <xmb8dsv4@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=217626
Tested-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Reviewed-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Acked-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20231128053653.101798-5-mario.limonciello@amd.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-31 16:18:56 -08:00
..
Makefile PM / QoS: Initial kunit test 2019-11-29 12:04:49 +01:00
clock_ops.c PM: runtime: add devm_pm_clk_create helper 2021-08-26 11:28:07 -07:00
common.c PM: domains: Extend dev_pm_domain_detach() doc 2022-04-13 17:07:58 +02:00
domain.c PM: domains: Move the verification of in-params from genpd_add_device() 2023-06-16 19:39:51 +02:00
domain_governor.c PM: domains: Store the next hrtimer wakeup in genpd 2022-11-09 21:14:21 -06:00
generic_ops.c drivers: base: power: add proper SPDX identifiers on files that did not have them. 2019-04-04 20:03:40 +02:00
main.c PM: sleep: Fix possible deadlocks in core system-wide PM code 2024-01-31 16:18:49 -08:00
power.h PM: sleep: wakeirq: fix wake irq arming 2023-07-24 09:51:51 +02:00
qos-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
qos.c PM / QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY 2019-11-29 12:04:50 +01:00
runtime.c Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08:00
sysfs.c drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
trace.c rtc: Extend timeout for waiting for UIP to clear to 1s 2024-01-31 16:18:56 -08:00
wakeirq.c PM: sleep: wakeirq: drop unused enable helpers 2023-07-24 09:51:51 +02:00
wakeup.c PM: suspend: Fix pm_suspend_target_state handling for !CONFIG_PM 2023-05-24 18:52:14 +02:00
wakeup_stats.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00