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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230809-pca9450-reboot-v2-2-b98b4f8139d5@skidata.com>
Date:   Wed, 09 Aug 2023 21:24:04 +0200
From:   Benjamin Bara <bbara93@...il.com>
To:     Lee Jones <lee@...nel.org>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Tony Lindgren <tony@...mide.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Dmitry Osipenko <dmitry.osipenko@...labora.com>,
        peng.fan@....nxp.com, rafael.j.wysocki@...el.com,
        Jerome Neanne <jneanne@...libre.com>
Cc:     linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
        linux-omap@...r.kernel.org,
        Benjamin Bara <benjamin.bara@...data.com>
Subject: [PATCH v2 2/6] mfd: rk8xx: Specify restart mode

From: Benjamin Bara <benjamin.bara@...data.com>

The current restart handler registration does not specify whether the
restart is a cold or a warm one. Instead, cold ones are typically
registered with a HIGH prio. Now, as do_kernel_restart() knows about the
type, the priorization is implicitly done (cold restarts are executed
first) and the reboot_mode kernel parameter (which is currently mostly
ignored) can be respected.

Signed-off-by: Benjamin Bara <benjamin.bara@...data.com>
---
v2:
- improve commit message
- use registration helper instead
---
 drivers/mfd/rk8xx-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/rk8xx-core.c b/drivers/mfd/rk8xx-core.c
index 11a831e92da8..7faf8e1189f7 100644
--- a/drivers/mfd/rk8xx-core.c
+++ b/drivers/mfd/rk8xx-core.c
@@ -696,9 +696,9 @@ int rk8xx_probe(struct device *dev, int variant, unsigned int irq, struct regmap
 		switch (rk808->variant) {
 		case RK809_ID:
 		case RK817_ID:
-			ret = devm_register_sys_off_handler(dev,
-							    SYS_OFF_MODE_RESTART, SYS_OFF_PRIO_HIGH,
-							    &rk808_restart, rk808);
+			ret = devm_register_cold_restart_handler(dev,
+								 &rk808_restart,
+								 rk808);
 			if (ret)
 				dev_warn(dev, "failed to register rst handler, %d\n", ret);
 			break;

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ