summaryrefslogtreecommitdiff
path: root/include/linux/reboot.h
diff options
context:
space:
mode:
authorKai-Heng Feng <kai.heng.feng@canonical.com>2022-09-29 10:05:23 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-10-04 16:59:36 +0300
commite7fd8b68404f3d8bc03f85bc3c078d67096be06f (patch)
tree59af6e6c573a9f417743746e38a761abb04f2d59 /include/linux/reboot.h
parentf76349cf41451c5c42a99f18a9163377e4b364ff (diff)
downloadlinux-e7fd8b68404f3d8bc03f85bc3c078d67096be06f.tar.xz
kernel/reboot: Add SYS_OFF_MODE_RESTART_PREPARE mode
Add SYS_OFF_MODE_RESTART_PREPARE callbacks to be invoked before a system restart. Suggested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> [ rjw: Changelog edits ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/reboot.h')
-rw-r--r--include/linux/reboot.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/reboot.h b/include/linux/reboot.h
index e5d9ef886179..2b6bb593be5b 100644
--- a/include/linux/reboot.h
+++ b/include/linux/reboot.h
@@ -106,6 +106,14 @@ enum sys_off_mode {
SYS_OFF_MODE_POWER_OFF,
/**
+ * @SYS_OFF_MODE_RESTART_PREPARE:
+ *
+ * Handlers prepare system to be restarted. Handlers are
+ * allowed to sleep.
+ */
+ SYS_OFF_MODE_RESTART_PREPARE,
+
+ /**
* @SYS_OFF_MODE_RESTART:
*
* Handlers restart system. Handlers are disallowed to sleep.