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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220122035421.4086618-2-f.fainelli@gmail.com>
Date:   Fri, 21 Jan 2022 19:54:18 -0800
From:   Florian Fainelli <f.fainelli@...il.com>
To:     linux-arm-kernel@...ts.infradead.org
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        bcm-kernel-feedback-list@...adcom.com (maintainer:BROADCOM BCM7XXX ARM
        ARCHITECTURE), Mark Rutland <mark.rutland@....com>,
        Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
        linux-kernel@...r.kernel.org (open list)
Subject: [PATCH 1/4] firmware: psci: Export a couple of suspend symbols

Export psci_system_suspend_enter() and psci_cpu_suspend_enter() for
the Broadcom STB PSCI extension to be usable and built as a loadable
module.

Signed-off-by: Florian Fainelli <f.fainelli@...il.com>
---
 drivers/firmware/psci/psci.c | 9 ++++++++-
 include/linux/psci.h         | 2 ++
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index cfb448eabdaa..9a60e340c248 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -355,7 +355,13 @@ int psci_cpu_suspend_enter(u32 state)
 
 	return ret;
 }
+#else
+int psci_cpu_suspend_enter(u32 state)
+{
+	return -EOPNOTSUPP;
+}
 #endif
+EXPORT_SYMBOL_GPL(psci_cpu_suspend_enter);
 
 static int psci_system_suspend(unsigned long unused)
 {
@@ -365,10 +371,11 @@ static int psci_system_suspend(unsigned long unused)
 			      pa_cpu_resume, 0, 0);
 }
 
-static int psci_system_suspend_enter(suspend_state_t state)
+int psci_system_suspend_enter(suspend_state_t state)
 {
 	return cpu_suspend(0, psci_system_suspend);
 }
+EXPORT_SYMBOL_GPL(psci_system_suspend_enter);
 
 static const struct platform_suspend_ops psci_suspend_ops = {
 	.valid          = suspend_valid_only_mem,
diff --git a/include/linux/psci.h b/include/linux/psci.h
index 4ca0060a3fc4..ffeba6b08e10 100644
--- a/include/linux/psci.h
+++ b/include/linux/psci.h
@@ -9,6 +9,7 @@
 
 #include <linux/arm-smccc.h>
 #include <linux/init.h>
+#include <linux/suspend.h>
 #include <linux/types.h>
 
 #define PSCI_POWER_STATE_TYPE_STANDBY		0
@@ -17,6 +18,7 @@
 bool psci_tos_resident_on(int cpu);
 
 int psci_cpu_suspend_enter(u32 state);
+int psci_system_suspend_enter(suspend_state_t state);
 bool psci_power_state_is_valid(u32 state);
 int psci_set_osi_mode(bool enable);
 bool psci_has_osi_support(void);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ