summaryrefslogtreecommitdiff
path: root/include/trace
diff options
context:
space:
mode:
authorMario Limonciello (AMD) <superm1@kernel.org>2025-11-12 16:40:23 -0600
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-11-14 17:05:53 +0100
commit0ca04993dac9b0d21ffbfd22bf54cc43ec2c49f2 (patch)
tree28003ab9b72ebaf9b2a97a96801e82cb99d88763 /include/trace
parent9cf02802d60af2ab52fc5f6d015baae946c85072 (diff)
PM: Introduce new PMSG_POWEROFF event
PMSG_POWEROFF will be used for the PM core to allow differentiating between a hibernation or shutdown sequence when re-using callbacks for common code. Hibernation is started by writing a hibernation method (such as 'platform' 'shutdown', or 'reboot') to use into /sys/power/disk and writing 'disk' to /sys/power/state. Shutdown is initiated with the reboot() syscall with arguments on whether to halt the system or power it off. Tested-by: Eric Naim <dnaim@cachyos.org> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20251112224025.2051702-2-superm1@kernel.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/trace')
-rw-r--r--include/trace/events/power.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/trace/events/power.h b/include/trace/events/power.h
index 82904291c2b8..370f8df2fdb4 100644
--- a/include/trace/events/power.h
+++ b/include/trace/events/power.h
@@ -179,7 +179,8 @@ TRACE_EVENT(pstate_sample,
{ PM_EVENT_HIBERNATE, "hibernate" }, \
{ PM_EVENT_THAW, "thaw" }, \
{ PM_EVENT_RESTORE, "restore" }, \
- { PM_EVENT_RECOVER, "recover" })
+ { PM_EVENT_RECOVER, "recover" }, \
+ { PM_EVENT_POWEROFF, "poweroff" })
DEFINE_EVENT(cpu, cpu_frequency,