aboutsummaryrefslogtreecommitdiff
path: root/drivers/firmware/psci/psci.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <[email protected]>2022-09-26 14:02:49 +0300
committerArnd Bergmann <[email protected]>2022-09-28 22:37:55 +0200
commit998fcd001feb8d71f2838d0949f2aeac2a0cbb9e (patch)
treee000ac04a9c0b65a187f7f483f82582761f7a7af /drivers/firmware/psci/psci.c
parentf6f7d870c5b6f3eac19ffedafffe8a8a9a034239 (diff)
firmware/psci: Print a warning if PSCI doesn't accept PC mode
The function psci_pd_try_set_osi_mode() will print an error if enabling OSI mode fails. To ease debugging PSCI issues print corresponding message if switching to PC mode fails too. Signed-off-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Sudeep Holla <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Acked-by: Mark Rutland <[email protected]> Link: https://lore.kernel.org/r/[email protected]' Signed-off-by: Arnd Bergmann <[email protected]>
Diffstat (limited to 'drivers/firmware/psci/psci.c')
-rw-r--r--drivers/firmware/psci/psci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c
index cfb448eabdaa..1628f1edef4a 100644
--- a/drivers/firmware/psci/psci.c
+++ b/drivers/firmware/psci/psci.c
@@ -163,6 +163,8 @@ int psci_set_osi_mode(bool enable)
PSCI_1_0_SUSPEND_MODE_PC;
err = invoke_psci_fn(PSCI_1_0_FN_SET_SUSPEND_MODE, suspend_mode, 0, 0);
+ if (err < 0)
+ pr_warn("failed to set %s mode: %d\n", enable ? "OSI" : "PC", err);
return psci_to_linux_errno(err);
}