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>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 Apr 2023 15:03:14 +0800
From:   wangyouwan@....com
To:     rafael@...nel.org, viresh.kumar@...aro.org
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        youwan Wang <wangyouwan@....com>
Subject: [PATCH] cpufreq: create cooling device based on ACPI

From: youwan Wang <wangyouwan@....com>

When using the "scpi_cpufreq" driver, an error
occurs:cpufreq_cooling: OF node not available for cpu*.
The current computer motherboard is using ACPI firmware.
Go to see that the error is caused by calling the
"of_cpufreq_cooling_register" interface.
comment:create cpufreq cooling device based on DT.

Signed-off-by: youwan Wang <wangyouwan@....com>
---
 drivers/cpufreq/cpufreq.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 6b52ebe5a890..3418c68959d5 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1528,8 +1528,13 @@ static int cpufreq_online(unsigned int cpu)
 	if (cpufreq_driver->ready)
 		cpufreq_driver->ready(policy);
 
-	if (cpufreq_thermal_control_enabled(cpufreq_driver))
+	if (cpufreq_thermal_control_enabled(cpufreq_driver)) {
+#ifdef CONFIG_ACPI
+		policy->cdev = cpufreq_cooling_register(policy);
+#else
 		policy->cdev = of_cpufreq_cooling_register(policy);
+#endif
+	}
 
 	pr_debug("initialization complete\n");
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ