summaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorMario Limonciello <mario.limonciello@amd.com>2022-08-29 11:29:49 -0500
committerHans de Goede <hdegoede@redhat.com>2022-09-09 17:37:40 +0200
commit811d59fdf56a17c66742578fe8be8a6a841af448 (patch)
treeecb1c30c5e5082ba8e3d7c664323717db40d822a /kernel/power
parent76fba1221e3045570478381c3436c8c2a2656376 (diff)
ACPI: s2idle: Add a new ->check() callback for platform_s2idle_ops
On some platforms it is found that Linux more aggressively enters s2idle than Windows enters Modern Standby and this uncovers some synchronization issues for the platform. To aid in debugging this class of problems in the future, add support for an extra optional callback intended for drivers to emit extra debugging. Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://lore.kernel.org/r/20220829162953.5947-2-mario.limonciello@amd.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/suspend.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/power/suspend.c b/kernel/power/suspend.c
index 827075944d28..c6272d466e58 100644
--- a/kernel/power/suspend.c
+++ b/kernel/power/suspend.c
@@ -136,6 +136,9 @@ static void s2idle_loop(void)
break;
}
+ if (s2idle_ops && s2idle_ops->check)
+ s2idle_ops->check();
+
s2idle_enter();
}