diff options
author | David Brazdil <dbrazdil@google.com> | 2020-12-02 21:41:02 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-12-04 11:44:24 +0300 |
commit | 6df3e14436f6ee254b1a4952d90ee8988be59c89 (patch) | |
tree | 22418ff59235f3fd8499263c37059926e2171e37 /drivers/firmware/psci/psci.c | |
parent | 82ac62d1658b42392282550078a189ccd3f50214 (diff) | |
download | linux-6df3e14436f6ee254b1a4952d90ee8988be59c89.tar.xz |
psci: Add accessor for psci_0_1_function_ids
Make it possible to retrieve a copy of the psci_0_1_function_ids struct.
This is useful for KVM if it is configured to intercept host's PSCI SMCs.
Signed-off-by: David Brazdil <dbrazdil@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20201202184122.26046-7-dbrazdil@google.com
Diffstat (limited to 'drivers/firmware/psci/psci.c')
-rw-r--r-- | drivers/firmware/psci/psci.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index 593fdd0e09a2..f5fc429cae3f 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -58,15 +58,13 @@ typedef unsigned long (psci_fn)(unsigned long, unsigned long, unsigned long, unsigned long); static psci_fn *invoke_psci_fn; -struct psci_0_1_function_ids { - u32 cpu_suspend; - u32 cpu_on; - u32 cpu_off; - u32 migrate; -}; - static struct psci_0_1_function_ids psci_0_1_function_ids; +struct psci_0_1_function_ids get_psci_0_1_function_ids(void) +{ + return psci_0_1_function_ids; +} + #define PSCI_0_2_POWER_STATE_MASK \ (PSCI_0_2_POWER_STATE_ID_MASK | \ PSCI_0_2_POWER_STATE_TYPE_MASK | \ |