From: Florian Fainelli <f.fainelli@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
bcm-kernel-feedback-list@broadcom.com (maintainer:BROADCOM
BCM7XXX ARM ARCHITECTURE), Mark Rutland <mark.rutland@arm.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 1/4] firmware: psci: Export a couple of suspend symbols
Date: Fri, 21 Jan 2022 19:54:18 -0800 [thread overview]
Message-ID: <20220122035421.4086618-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20220122035421.4086618-1-f.fainelli@gmail.com>
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@gmail.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
next prev parent reply other threads:[~2022-01-22 3:55 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-22 3:54 [PATCH 0/4] Broadcom STB PM PSCI extensions Florian Fainelli
2022-01-22 3:54 ` Florian Fainelli [this message]
2022-01-22 12:22 ` [PATCH 1/4] firmware: psci: Export a couple of suspend symbols kernel test robot
2022-01-22 3:54 ` [PATCH 2/4] soc: bcm: brcmstb: Make legacy PM code depend on !ARM_PSCI_FW Florian Fainelli
2022-01-22 3:54 ` [PATCH 3/4] soc: bcm: brcmstb: Added support for PSCI system suspend operations Florian Fainelli
2022-01-22 6:09 ` kernel test robot
2022-01-22 7:10 ` kernel test robot
2022-02-03 12:09 ` Mark Rutland
2022-02-03 18:45 ` Florian Fainelli
2022-01-22 3:54 ` [PATCH 4/4] Documentation: ABI: Document Broadcom STB PSCI firmware files Florian Fainelli
2022-01-27 3:55 ` [PATCH 0/4] Broadcom STB PM PSCI extensions Florian Fainelli
2022-02-03 10:47 ` Mark Rutland
2022-02-03 18:32 ` Florian Fainelli
2022-02-03 11:14 ` Sudeep Holla
2022-02-03 17:36 ` Florian Fainelli
2022-02-03 18:52 ` Sudeep Holla
2022-02-03 19:33 ` Florian Fainelli
2022-02-07 16:27 ` Sudeep Holla
2022-02-14 18:12 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220122035421.4086618-2-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=mark.rutland@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).