lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230525211655.627415-2-evalenti@kernel.org>
Date:   Thu, 25 May 2023 14:16:53 -0700
From:   Eduardo Valentin <evalenti@...nel.org>
To:     daniel.lezcano@...aro.org, rafael@...nel.org,
        linux-pm@...r.kernel.org
Cc:     Eduardo Valentin <eduval@...zon.com>,
        Amit Kucheria <amitk@...nel.org>,
        Zhang Rui <rui.zhang@...el.com>,
        Jonathan Corbet <corbet@....net>, linux-doc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] thermal: core: introduce governor .reboot_prepare()

From: Eduardo Valentin <eduval@...zon.com>

This callback is used to notify the governors that
reboot is coming up. Upon this event, this callback
gives governors the opportunity to leave the thermal
zones in a sane state prior to reboot.

Cc: "Rafael J. Wysocki" <rafael@...nel.org> (supporter:THERMAL)
Cc: Daniel Lezcano <daniel.lezcano@...aro.org> (supporter:THERMAL)
Cc: Amit Kucheria <amitk@...nel.org> (reviewer:THERMAL)
Cc: Zhang Rui <rui.zhang@...el.com> (reviewer:THERMAL)
Cc: Jonathan Corbet <corbet@....net> (maintainer:DOCUMENTATION)
Cc: linux-pm@...r.kernel.org (open list:THERMAL)
Cc: linux-doc@...r.kernel.org (open list:DOCUMENTATION)
Cc: linux-kernel@...r.kernel.org (open list)

Signed-off-by: Eduardo Valentin <eduval@...zon.com>
---
 include/linux/thermal.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 82c8e09a63e0..d3c8af928522 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -201,6 +201,9 @@ struct thermal_zone_device {
  *		below the trip point temperature
  * @check_error:	callback called whenever temperature updates fail.
  *		Opportunity for the governor to react on errors.
+ * @reboot_prepare:	callback called upon system restart.
+ *		Opportunity for the governor to tear down zones or at least
+ *		leave them in a safe state.
  * @governor_list:	node in thermal_governor_list (in thermal_core.c)
  */
 struct thermal_governor {
@@ -209,6 +212,7 @@ struct thermal_governor {
 	void (*unbind_from_tz)(struct thermal_zone_device *tz);
 	int (*throttle)(struct thermal_zone_device *tz, int trip);
 	void (*check_error)(struct thermal_zone_device *tz, int error);
+	void (*reboot_prepare)(struct thermal_zone_device *tz);
 	struct list_head	governor_list;
 };
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ