mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 17:02:17 +00:00
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]>
This commit is contained in:
@@ -124,10 +124,8 @@ static bool psci_pd_try_set_osi_mode(void)
|
||||
return false;
|
||||
|
||||
ret = psci_set_osi_mode(true);
|
||||
if (ret) {
|
||||
pr_warn("failed to enable OSI mode: %d\n", ret);
|
||||
if (ret)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user